Columns
The$table->columns() method is used to define the columns in your table. It is an array of column objects, in the order they should appear in your table.
We have many columns available for your tables, including:
To view a full list of available table columns, see the Table Builder documentation.
You may also build your own completely custom table columns.
Sorting a column by default
If a column issortable(), you may choose to sort it by default using the $table->defaultSort() method:
Filters
Filters are predefined scopes that administrators can use to filter records in your table. The$table->filters() method is used to register these.
Displaying filters above or below the table content
To render the filters above the table content instead of in a popover, you may use:Actions
Actions are buttons that are rendered at the end of table rows. They allow the user to perform a task on a record in the table. To learn how to build actions, see the full actions documentation. To add actions to a table, use the$table->actions() method:
Grouping actions
You may use anActionGroup object to group multiple table actions together in a dropdown:
Bulk actions
Bulk actions are buttons that are rendered in a dropdown in the header of the table. They appear when you select records using the checkboxes at the start of each table row. They allow the user to perform a task on multiple records at once in the table. To learn how to build bulk actions, see the full actions documentation. To add bulk actions, use the$table->bulkActions() method:
Record select checkbox position
By default, the record select checkboxes are rendered at the start of the row. You may move them to the end of the row:Reordering records
To allow the user to reorder records using drag and drop in your table, you can use thereorderable() method:
sort attribute to the $fillable array there.
When making the table reorderable, a new button will be available on the table to toggle reordering. Pagination will be disabled in reorder mode to allow you to move records between pages.
The reorderable() method passes in the name of a column to store the record order in. If you use something like spatie/eloquent-sortable with an order column such as order_column, you may pass this in to reorderable():
Polling content
You may poll table content so that it refreshes at a set interval, using thepoll() method:
Authorization
For authorization, Filament will observe any model policies that are registered in your app. Users may access the List page if theviewAny() method of the model policy returns true.
The reorder() method is used to control reordering a record.
Customizing the Eloquent query
Although you can customize the Eloquent query for the entire resource, you may also make specific modifications for the List page table. To do this, override thegetTableQuery() method on the page class:
Customizing the query string
Table search, filters, sorts and other stateful properties are stored in the URL as query strings. Since Filament uses Livewire internally, this behaviour can be modified by overriding the$queryString property on the List page of the resource. For instance, you can employ query string aliases to rename some of the properties using as:
Custom view
For further customization opportunities, you can override the static$view property on the page class to a custom view in your app: