'datetime', 'datetime_end' => 'datetime', 'slot_date' => 'date', ]; public function trip(): BelongsTo { return $this->belongsTo(Trip::class); } public function plannableItems(): BelongsToMany { return $this->belongsToMany(PlannableItem::class, 'planned_items') ->withPivot('sort_order') ->withTimestamps() ->orderBy('planned_items.sort_order'); } public function plannedItems() { return $this->hasMany(PlannedItem::class); } }