'int', 'start_date' => 'datetime', 'end_date' => 'datetime', 'price' => 'float', 'capacity' => 'int', 'status' => 'int' ]; protected $fillable = [ 'travel_type_id', 'title', 'slug', 'description', 'duration', 'start_date', 'end_date', 'price', 'capacity', 'status' ]; public function travelType() { return $this->belongsTo(TravelType::class); } public function flights() { return $this->belongsToMany(Flight::class, 'tour_flights') ->withPivot('id') ->withTimestamps(); } //اضافه شده (بعدا بررسی بشه) public function comments() { return $this->morphMany(Comment::class, 'commentable'); } public function favorites() { return $this->morphMany(Favorite::class, 'favoritable'); } public function files() { return $this->morphMany(File::class, 'fileable'); } public function getRouteKeyName() { return 'slug'; } }