F
Filament2y ago
dyo

send parameter in custom action

how can i send parameter, which is record id, in table custom action
Action::make('edit')->action('edit'),
Action::make('edit')->action('edit'),
Solution:
how can i send parameter, which is record id, in table custom action
Action::make('edit')->action('edit'),
Action::make('edit')->action('edit'),
...
Jump to solution
9 Replies
LeandroFerreira
->action(function($record) {}) ?
dyo
dyoOP2y ago
sorry, can you give more example.. i'm calling the action in getTableActions()
LeandroFerreira
this?
protected function getTableActions(): array
{
return [
EditAction::make()
->action(function ($record) {
dd($record);
}),
];
}
protected function getTableActions(): array
{
return [
EditAction::make()
->action(function ($record) {
dd($record);
}),
];
}
dyo
dyoOP2y ago
i'm using custom form by calling edit() in the livewire component. that's why i'm not using EditAction class.. @Leandro Ferreira
LeandroFerreira
would you like to redirect? ->url(fn ($record): string => route('route-name', ['id' => $record->id]))
dyo
dyoOP2y ago
no, i'm using a modal
LeandroFerreira
->form([
//fields
])
->form([
//fields
])
dyo
dyoOP2y ago
thanks, solved it with this..
Want results from more Discord servers?
Add your server