DEV Community

JohnDivam
JohnDivam

Posted on

Filament: Form Select append extra option

Forms\Components\Select::make('employee_id')->label('recipient')
                        ->options(function(){
                            return Employee::query()->active()
                            ->pluck('name', 'id')
                            ->toBase() 
                            ->put('other', 'other') 
                            ->toArray();
                        })
                        ->reactive()
                        ->required(),
Enter fullscreen mode Exit fullscreen mode

Top comments (0)