All pages

reference

API reference

Every method on the Kanban and KanbanColumn classes, plus the page hooks you can override.

Kanban

MethodDescriptionParameters
model()Set the Eloquent model for the kanban boardstring|Model $model
statusField()Set the status field that decides column placementstring $field
orderField()Enable card reordering against a sortable column?string $field
titleField()Set the title field shown on cardsstring $field
descriptionField()Set the description field shown on cardsstring $field
columns()Set the kanban columnsarray|Closure $columns
searchableFields()Set the fields that can be searchedbool|Closure $fields
enableLoadingIndicator()Enable or disable the loading indicatorClosure|bool $condition = true
enableFilterIndicator()Enable or disable the filter indicatorClosure|bool $condition = true
filterFormSchema()Set the filter form schemaarray|Closure $schema
recordActions()Set the actions available on a recordarray|Closure $actions
columnHeaderActions()Set the actions available in column headersarray|Closure $actions
recordsPerColumn()Set how many records load per columnint $count
modifyQueryUsing()Modify the base query for fetching recordsClosure $callback
modifyRecordQueryUsing()Modify the query for a column's recordsClosure $callback
applyFiltersUsing()Set custom filter logicClosure $callback
applySearchUsing()Set custom search logicClosure $callback
emptyStateMessage()Set the empty state copystring $title, string $description

KanbanColumn

MethodDescriptionParameters
make()Create a column for a status valuestring $status
label()Set the column labelstring|Closure $label
description()Set the column descriptionstring $description
icon()Set the column iconstring|Closure|ScalableIcon $icon
iconColor()Set the icon colourstring|Closure $color
hidden()Hide or show the columnbool|Closure $hidden = true
allowedTransitions()Set the statuses a card may move toarray|Closure $transitions
lockCardUsing()Decide, per record, whether a card is lockedClosure $callback
lockedIcon()Set the icon shown on a locked cardbool|Closure|ScalableIcon $icon = true
lockedLabel()Set the label shown on a locked cardstring|Closure $label = true
modifyRecordQueryUsing()Modify the query for this column's recordsClosure $callback

Reading the configuration

Useful when you write your own action or hook and need what the board was configured with.

MethodReturns
getStatusField()The status field name
getOrderField()The order field name, or null when reordering is off
isReorderable()Whether orderField() was set
getQuery()The configured base query, with your modifyQueryUsing() applied
RecordPosition::GAPThe gap between two positions — 1.0
RecordPosition::between()The position between two neighbours — (?float $previous, ?float $next): float

Page hooks

Override these on the class that extends KanbanPage.

HookFires whenSignature
beforeRecordMove()Before a card changes column(string $newStatus, Model $record): void
handleRecordMove()Instead of the default status write(string $newStatus, Model $record): void
afterRecordMove()After a card changed column(mixed $oldStatus, string $newStatus, Model $record): void
beforeRecordReorder()Before a card moves within its column(float $position, Model $record): void
handleRecordReorder()Instead of the default position write(float $position, Model $record): void
afterRecordReorder()After a card moved within its column(float $position, Model $record): void

Render hooks

HookLocation
KanbanRenderHook::KANBAN_SEARCH_BEFOREAbove the search bar
KanbanRenderHook::KANBAN_PAGE_FOOTERBottom of the page