Skip to main content

Introduction

Actions are interactive buttons that can be added to tables in various positions:
  • Record actions - Buttons at the end of each table row
  • Bulk actions - Operations on selected rows
  • Header actions - Buttons in the table header
  • Toolbar actions - Buttons in the table toolbar
  • Column actions - Clickable cells that trigger actions
Actions can open modals, request confirmation, collect form data, and execute custom logic.

Record actions

Add action buttons to the end of each table row:

Accessing the record

All action callbacks receive the current $record:

Positioning record actions

Move actions before columns:
Move actions before the checkbox column:

Action modals

Actions can open modals for confirmation or to collect additional data:

Actions with forms

Collect data before executing the action:

Pre-filling form data

Bulk actions

Execute operations on multiple selected records:

Accessing selected records

The $records parameter is an Eloquent collection:

Authorizing bulk actions

Check policy methods for each selected record:
Records that fail authorization will be excluded from $records.

Bulk action notifications

Provide feedback about partial successes:

Grouping bulk actions

Organize multiple bulk actions in a dropdown:
Shorthand when all bulk actions are grouped:

Deselecting after bulk action

Performance optimization

Process large selections in chunks:
Or work with IDs only:

Limiting record selection

Restrict which records can be selected:
Limit total number of selections:
Prevent selecting all pages at once:

Header actions

Add actions to the table header:
Header actions can be regular actions or bulk actions.

Toolbar actions

Add actions to the table toolbar:

Column actions

Make column cells clickable to trigger actions:
Simple click callback:

Grouping actions

Group multiple actions in a dropdown:

Action customization

Labels and icons

Colors

Sizes

Button styles

Conditional visibility

Disabled state

Notifications

Send notifications after actions:
Or use the built-in methods:

Redirects

Redirect after action completion:
Or use the redirect method: