Pages · Laravilt
Grouping
Group table rows by a column value.
Define the available groups with Laravilt\Tables\Grouping\Group. Users pick one from the table toolbar.
php
Group titles and descriptions
php
Or read them from attributes:
php
Pagination while grouped
Infinite scroll is disabled while a group is active. You can set a separate page size:
php
API reference
| Method | Description |
|---|---|
Table::groups() | Available groups |
Table::defaultGroup() | Group applied on first load |
Table::groupedPerPage() | Page size while grouped |
Group::label() | Group label |
Group::collapsible() | Allow collapsing (default true) |
Group::getTitleFromRecordUsing(), titleAttribute() | Group title |
Group::getDescriptionFromRecordUsing(), descriptionAttribute() | Group description |
Group::orderQueryUsing() | Order the query by the group column (default true) |