essentials
Core concepts
The pieces of a board and the configuration every board starts from.
Board structure
A board is four things:
- Columns — the statuses or stages in your workflow
- Cards — individual records, draggable between columns
- Actions — the operations you can run on a record, a column, or the page
- Search and filters — the tools for narrowing what the board shows
Model configuration
Model
->model(Task::class)
->model(\App\Models\Task::class)
Status field
The field that decides which column a record lands in.
->statusField('status')
->statusField('state')
->statusField('phase')
Title and description fields
->titleField('title') // default title field
->titleField('name')
->titleField('subject')
->descriptionField('description') // default description field
->descriptionField('content')
->descriptionField('notes')
Order field
Opt in to card positions. Without it, cards keep the order your query returns.
->orderField('position')
Records per column
->recordsPerColumn(10)
Column configuration
use Asmit\AdvancedKanban\Columns\KanbanColumn;
->columns([
KanbanColumn::make('todo')
->label('To Do')
->color('gray'),
KanbanColumn::make('in_progress')
->label('In Progress')
->color('blue'),
KanbanColumn::make('completed')
->label('Completed')
->color('green'),
])
The key you pass to KanbanColumn::make() is matched against the value in your status field, so
make('todo') collects every record whose status is todo.