Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 850 Bytes

creating-bulk-actions.md

File metadata and controls

46 lines (34 loc) · 850 Bytes
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.

Property

The first way to define your bulk actions is with the bulkActions component property:

public array $bulkActions = [
    'exportSelected' => 'Export',
];

Method

You can also use the bulkActions method on the component:

public function bulkActions(): array
{
    return [
        'exportSelected' => 'Export',
    ];
}

Configuration

You can also set them via the component's configure method:

public function configure(): void
{
    $this->setBulkActions([
        'exportSelected' => 'Export',
    ]);
}