How do I add a bulk action to an existing resource list?
\Aero\Admin\BulkAction::create(
\Aero\Admin\BulkActions\DeleteProductsBulkAction::class,
\Aero\Admin\ResourceLists\ProductsResourceList::class
)
->title('Delete products')
->permissions('products.delete')
->confirm();
See here for how to create a custom bulk action.
Methods
| Method | Description |
notRunnable() |
Removes the run button from the bulk action, intention being you replace this with a custom button. |
wideContent() |
Displays bulk action view in a wider container. |
confirm() |
Prompts the user to confirm running the bulk action. |
confirmTitle(string $title) |
Sets the title of the confirmation popup. Default is "Are you sure? |
confirmText(string $text) |
Sets text in the confirmation popup. Default is no text. |
confirmButtonText(string $text) |
Sets the confirmation popup confirm button text. Default is "Yes". |
title(string $title) |
Sets the title of the bulk action. |
processingText(string $text) |
Sets the processing text (shown when a bulk action is queued). Default is __('Bulk action is being processed'). |
successText(string $text) |
Sets the success text (shown when a bulk action is ran). Default is __('Bulk action has been processed'). |
view(string $view) |
Sets a view for the bulk action to redirect to when ran. Allows options to be provided that are required for the bulk action to run. |
group(string $group) |
Sets the group of the bulk action, used when they're displayed to order them. |