@@ -136,29 +136,6 @@ For drag and drop ordering to work, you can either:
136136
137137For a functional Kanban board, you only need to implement ** two methods** :
138138
139- ### 1. getSubject() - Provides the data source
140- ``` php
141- public function getSubject(): Builder
142- {
143- return Task::query();
144- }
145- ```
146-
147- ### 2. mount() - Configures the board
148- ``` php
149- public function mount(): void
150- {
151- $this
152- ->titleField('title'); // Required: Field used for card titles
153- ->columnField('status') // Required: Field that determines column placement
154- ->columns([ // Required: Define your columns
155- 'todo' => 'To Do',
156- 'in_progress' => 'In Progress',
157- 'completed' => 'Completed',
158- ])
159- }
160- ```
161-
162139### Example: Minimal Read-Only Board
163140
164141Here's a complete example of a minimal read-only board:
@@ -174,19 +151,21 @@ use Relaticle\Flowforge\Filament\Pages\KanbanBoardPage;
174151
175152class TasksBoardPage extends KanbanBoardPage
176153{
177- protected static ? string $navigationIcon = 'heroicon-o-view-columns';
154+ protected static string|null|\BackedEnum $navigationIcon = 'heroicon-o-view-columns';
178155
156+ // Required: Provide the model data source
179157 public function getSubject(): Builder
180158 {
181159 return Task::query();
182160 }
183161
162+ // Required: To configure the board with title and column fields
184163 public function mount(): void
185164 {
186165 $this
187166 ->titleField('title');
188167 ->columnField('status')
189- ->columns([
168+ ->columns([
190169 'todo' => 'To Do',
191170 'in_progress' => 'In Progress',
192171 'completed' => 'Completed',
@@ -206,6 +185,7 @@ If you want users to be able to add new cards to the board, implement this metho
206185``` php
207186use Filament\Actions\Action;
208187use Filament\Forms;
188+ use Filament\Schemas\Schema;
209189
210190public function createAction(Action $action): Action
211191{
@@ -214,8 +194,8 @@ public function createAction(Action $action): Action
214194 ->icon('heroicon-o-plus')
215195 ->modalHeading('Create Task')
216196 ->modalWidth('xl')
217- ->form(function (Forms\Form $form ) {
218- return $form ->schema([
197+ ->form(function (Schema $schema ) {
198+ return $schema ->schema([
219199 Forms\Components\TextInput::make('title')
220200 ->required()
221201 ->placeholder('Enter task title')
@@ -237,14 +217,15 @@ If you want users to be able to edit existing cards, implement this method:
237217``` php
238218use Filament\Actions\Action;
239219use Filament\Forms;
220+ use Filament\Schemas\Schema;
240221
241222public function editAction(Action $action): Action
242223{
243224 return $action
244225 ->modalHeading('Edit Task')
245226 ->modalWidth('xl')
246- ->form(function (Forms\Form $form ) {
247- return $form ->schema([
227+ ->form(function (Schema $schema ) {
228+ return $schema ->schema([
248229 Forms\Components\TextInput::make('title')
249230 ->required()
250231 ->placeholder('Enter task title')
0 commit comments