Skip to content

In rows and cards

inRow() adds an action to every row and card of the list. Together with view, edit and delete they are shown as small buttons up to a limit per collection; the rest goes into a “…” menu, with delete last.

public function collection(Collection $collection): Collection
{
return $collection
->columns([...])
->rowActions(table: 3, cards: 2); // the defaults
}
  • If all actions fit, they are shown as buttons in their order.
  • Otherwise view, edit and actions marked primary() come first, then the others; whatever exceeds the limit goes into the menu.
  • rowActions(table: 0) puts everything into the menu.
  • On phones every action is in the menu.
  • The menu is built per record: actions that are not visible or not allowed for a record are left out.
  • Buttons with an icon show only the icon (the label is read by screen readers and shown in the menu as text), so give row actions an icon.
  • Actions with a danger colour are shown in red.
  • Actions with a form open their dialog, see The form in rows and cards.
  • After the action the list is reloaded with the same search, filters and page, and the message is shown.

Related lists on the detail page show the row actions of the related resource and the record actions of the relation.