Bulk Action

Can we use form in Bulk action....?
5 Replies
toeknee
toeknee2y ago
Yes, let me find the doc
toeknee
toeknee2y ago
Filament
Actions - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
Hemanath
HemanathOP2y ago
Thank you.Let ,me try protected function getTableBulkActions(): array { return [ BulkAction::make('updateAuthor') ->action(function (Collection $records, array $data): void { // dd($records->pluck('id')); foreach ($records as $record) { $record->paid = 1; $record->payment_to_ho_status = 'PAID'; $record->save(); } }) ->form([ Forms\Components\Hidden::make('data') ->default(function (Collection $records) { dd($records); return $records; }), ViewField::make('test') ->view('filament.pages.student.view-payment-received-student'), ]) ]; }
Hemanath
HemanathOP2y ago
Inside form dd(records) after selecting data showing item[] ....kindly advise how to do.....to get data
toeknee
toeknee2y ago
What are you trying to do? As per the documentation you get the records on the action? The form is to allow you to say confirm, or get a value to assign to the collection within the aciton.
Want results from more Discord servers?
Add your server