All pages

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

php
->model(Task::class)
->model(\App\Models\Task::class)

Status field

The field that decides which column a record lands in.

php
->statusField('status')
->statusField('state')
->statusField('phase')

Title and description fields

php
->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.

php
->orderField('position')

Records per column

php
->recordsPerColumn(10)

Column configuration

php
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.