title | weight |
---|---|
Creating Bulk Actions |
2 |
There are 3 ways to define your bulk actions.
They all do the same thing except provide different levels of flexibility.
The key is the Livewire method to call, and the value is the name of the item in the bulk actions dropdown.
The first way to define your bulk actions is with the bulkActions
component property:
public array $bulkActions = [
'exportSelected' => 'Export',
];
You can also use the bulkActions
method on the component:
public function bulkActions(): array
{
return [
'exportSelected' => 'Export',
];
}
You can also set them via the component's configure method:
public function configure(): void
{
$this->setBulkActions([
'exportSelected' => 'Export',
]);
}