F
Filament17mo ago
btx

Custom Action in Table

I am trying to create a custom Action, however I am unable to retrieve the record that I clicked on. What am I doing wrong? File: FormSubmissionResource::table()
->actions([
Tables\Actions\Action::make('import')
->label('Import')
->icon('heroicon-o-cloud-upload')
->action(function ($data) {
dd($data); // => []
})
->actions([
Tables\Actions\Action::make('import')
->label('Import')
->icon('heroicon-o-cloud-upload')
->action(function ($data) {
dd($data); // => []
})
2 Replies
LeandroFerreira
LeandroFerreira17mo ago
->action(function (YourModel $record) {
})
->action(function (YourModel $record) {
})
https://filamentphp.com/docs/2.x/tables/actions#single-actions
Filament
Actions - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
btx
btxOP17mo ago
ok I had to define the type, thx
Want results from more Discord servers?
Add your server