Skip to main content

The List Page

The List page displays a table of all records. It’s defined in the ListCustomers.php page class:
packages/panels/src/Resources/Pages/ListRecords.php

Table Configuration

Tables are configured in your resource’s table() method:

Tabs

Add tabs above the table to filter records:
packages/panels/src/Resources/Pages/ListRecords.php

Tab Badges

Add count badges to tabs:

Deferred Badge Loading

For expensive queries, load badges asynchronously:
The badge() value must be returned from a function when using deferBadge(). Raw values like badge(Customer::query()->count()) will execute immediately.

Tab Icons

Default Active Tab

Excluding Tab Queries When Resolving Records

When a record’s state changes, you may want actions to still work:
Do not use excludeQueryWhenResolvingRecord() on tabs that enforce authorization rules (tenant filtering, user ownership, etc.).

Customizing the Query

Modify the table query for the List page:
Or customize it only on the List page:

Table Features

Make columns searchable:

Bulk Actions

Actions that operate on multiple selected records:

Record URLs

By default, clicking a row opens the Edit or View page. The List page automatically determines which action is available:
packages/panels/src/Resources/Pages/ListRecords.php
Customize this behavior:

Reordering Records

Allow drag-and-drop reordering:
Authorize reordering with a policy method:

Custom Page Content

The List page schema contains these components by default:
packages/panels/src/Resources/Pages/ListRecords.php
Add custom components:

Header Actions

Add actions to the page header:

Empty State

Customize what shows when there are no records:

Polling

Auto-refresh the table at intervals:

Authorization

Users can access the List page if the viewAny() method of the model policy returns true:
The reorder() method controls record reordering: