Actions in lists
Lists offer the actions of a record in every row and card, bulk actions for selected records and an export.
In rows and cards
Section titled “In rows and cards”Every row and card shows view, edit and the actions marked
with inRow() as buttons, up to a limit; the rest goes into a “…” menu,
with delete last. On phones every action is in the menu.
$collection->rowActions(table: 3, cards: 2); // the defaultsActions marked primary() are shown as buttons first. Each action checks
its permission, visibility and the policies of the record; actions the
user may not run are not shown. See
Actions in rows and cards.
Bulk actions
Section titled “Bulk actions”With a delete permission or bulk actions, rows and cards get checkboxes.
Selecting records offers the bulk actions of
Resource::bulkActions() and delete.
- Selecting and deleting records requires
<slug>.delete, checked per record including policies. - Deleting a selection is all or nothing: if one record may not be deleted, none is.
Export
Section titled “Export”protected bool $exportable = true;adds an export of the current list – search, filters and sort applied – with the visible columns. See Exports.