Filament Tables has rapidly become one of the most potent tools for creating Laravel admin panels. In this guide, we will discuss the 5 powerful techniques for filament.
Persistence of Search and Sorting
In Filament Tables, we can easily make columns sortable and searchable using the sortable() and searchable() methods available on column components. However, one common issue is that when the page is refreshed, the applied search and sorting state is lost.
To persist search queries and sorting preferences in Filament Tables, you can enable session persistence using the following methods:
Persist sorting
public function table(Table $table): Table
{
return $table
->columns([
// ...
])
->persistSortInSession();
}
Persist searching
public function table(Table $table): Table
{
return $table
->columns([
// ...
])
->persistSearchInSession();
}
Persist searching for individual columns
public function table(Table $table): Table
{
return $table
->columns([
// ...
])
->persistColumnSearchesInSession();
}
Also read . 5 filament tips and tricks
Extending table using pushColumns()
pushColumns() is one of the most useful methods in Filament Tables.
Let’s consider a practical scenario. Suppose we already have a CustomerResource, and we want to create a new SupplierResource by extending the existing resource. Most of the table structure remains the same, but the supplier table requires an additional column that does not exist in the customer resource. If you want to learn more about extending Filament resources, you can read here.
At this point, we generally have two options:
- Copy all columns from the Customer resource and manually append the new column.
- Use
pushColumns()to extend the existing table configuration.
The first approach works, but it duplicates code and becomes difficult to maintain.
Instead, Filament provides the pushColumns() method, which allows us to append new columns without redefining the entire column list.
$table->pushColumns([
TextColumn::make('supplier_type')
->label('Supplier Type')
->badge(),
]);
With this approach, all columns from the parent resource remain intact, and Filament simply adds the new column to the existing table.
This method is especially useful when:
- extending an existing Filament resource,
- customizing tables provided by external packages,
Grouping Rows
In Filament Tables, we can group records based on a column value. For example, grouping by the status column allows records to appear organized under each status.
$table
->defaultGroup('status');
Once grouping is enabled, records are automatically displayed under their respective groups. You can define multiple group options by passing an array of columns to the groups() method, allowing users to select how they want the records to be grouped. Currently, Filament does not support nested grouping. However, you can also group by relationship fields using dot notation.
return $table
->groups([
'status',
'category.name',
])
->defaultGroup('status');
Single Column Action & Record URL
In Filament Tables, you can easily make any column clickable by chaining the url() or action() method to it.
For example, if you want a column to redirect to a resource page when clicked, you can use the url() method:
TextColumn::make('supplier.name')
->url(fn($record)=>SupplierResource::getUrl('view',['record'=>$record->supplier_id]))
Now, when users click on the supplier name, they will be redirected to the supplier’s view page.
You can also trigger custom logic using the action() method:
TextColumn::make('supplier.name')
->action(fn ($record) => /* your logic here */);
This is useful when you want to open a modal, trigger a workflow, or perform any custom action directly from the column without navigating away.
Defer Loading & Deferred Filters
When working with large datasets, loading the table immediately can sometimes affect performance. Filament provides defer loading and deferred filters to solve this problem.
Using deferLoading(), the table data will not load automatically when the page opens. Instead, it loads only when required, helping reduce initial page load time.
$table->deferLoading();
Filament also allows deferring filters using deferFilters(). Normally, every filter change triggers a query instantly, which can cause multiple unnecessary database requests. With deferred filters, users can select multiple filters first and then apply them together.
$table->deferFilters();
Conclusion
Filament Tables offer many powerful features beyond basic CRUD operations. By using techniques like persistence, grouping, column actions, deferred loading, you can build cleaner, faster, and more user-friendly admin panels. Exploring these advanced features helps you get the most out of Filament and create more professional Laravel applications. Read more in filament tables docs.

