*/ protected $fillable = [ 'name', 'slug', 'description', 'is_default', 'sort_order', ]; /** @var array */ protected $casts = [ 'is_default' => 'boolean', 'sort_order' => 'integer', ]; /** @return BelongsToMany */ public function statuses(): BelongsToMany { return $this->belongsToMany(Status::class, 'helpdesk_kanban_board_statuses', 'board_id', 'status_id') ->withPivot(['sort_order']) ->orderBy('helpdesk_kanban_board_statuses.sort_order') ->orderBy('helpdesk_statuses.sort_order') ->withTimestamps(); } }