Search
Global Search
In addition to the extensive filtering options, you can enable a global search field that will search across one or more columns with a wildcard search.
Enable by the Column class
One way to enable global search is by passing the searchable
argument to the column's make()
method:
php
TextColumn::make('name', searchable: true);
Alternatively, you may use the searchable()
and notSearchable()
methods:
php
TextColumn::make('name')->searchable();
TextColumn::make('name')->notSearchable();
Enable on the Table class
Another way to enable global search is by setting the $searchable
property on your Table class:
php
class Users extends Table
{
protected array|string $search = ['name', 'email'];
}