F
Filament10mo ago
Jocka

Get current row record in custom action

Tables\Actions\Action::make('make_additional_payment')
->label('Наплати дополнително')
->form([
Forms\Components\TextInput::make('price')
->label('Дополнителна цена за наплата')
->required(),
])
->action(function (array $data): void {
// send the call for additional payment
}),
Tables\Actions\Action::make('make_additional_payment')
->label('Наплати дополнително')
->form([
Forms\Components\TextInput::make('price')
->label('Дополнителна цена за наплата')
->required(),
])
->action(function (array $data): void {
// send the call for additional payment
}),
Hello guys, how can i get the current row in a custom action so i can send a call.
1 Reply
awcodes
awcodes10mo ago
$record should be available in the ->action() callback. So ->action(fn ($record, array $data) => do something with $record and $data)

Did you find this page helpful?