'date', 'origin_latitude' => 'decimal:7', 'origin_longitude' => 'decimal:7', 'total_distance_km' => 'decimal:2', ]; public function driver() { return $this->belongsTo(Driver::class, 'driver_id'); } public function vehicle() { return $this->belongsTo(Vehicle::class, 'vehicle_id'); } public function originLocation() { return $this->belongsTo(BusinessLocation::class, 'origin_location_id'); } public function stops() { return $this->hasMany(RouteStop::class, 'route_id')->orderBy('stop_order'); } public function shipments() { return $this->hasMany(Shipment::class, 'route_id'); } public function creator() { return $this->belongsTo(User::class, 'created_by'); } }