Run BulkAction Without Need to Select Record?
Is there possible to run BulkAction without need to select the record first? Means run bulk-action for all record in table by default
10 Replies
Anyone ?
You want a table header action and just query all your models.
I already make this action
Its working as i wanted . But i need to select record first in order to data appear in pdf after generated
I want to set it will capture all data while generating without i need to select the record
Is there any parameter i missing in my action?
You want a table header action and just query all your models.
So i just move my code into header action and change bulkaction to normal action?
No, but something like this:
You would want to do that on your
ListXXX.php
in the getHeaderActions
I forgot to mentioned . This code in relation manager table
So i want to capture all record from relation manager table
Well, the relation manager also has
->headerActions
on the $table πThen you probably need to filter with the owner record:
->action(fn ($livewire) => YourModel::where('related_id', $livewire->ownerRecord->id)->get()