Laravel Livewire Tables Documentation

🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.

This is the documentation for v1 but the latest version is v3. You can switch versions in the menu at the top. Check your current version with the following command:

composer show rappasoft/laravel-livewire-tables

Built-in searching

There are multiple ways to apply searching to a column, but the easiest is using the built-in column searchable() method.

Note: When it comes to searching, you must use either the column search or the search filter, not both. If you know you need more advanced searching from the start, opt for the search filter over the column searching.

1Column::make('Type')
2 ->searchable(),

You can also apply it to relationship columns:

1Column::make('Address', 'attributes.address')
2 ->searchable(),

You can override the default search query using a closure:

1Column::make('Type')
2 ->searchable(function (Builder $query, $searchTerm) {
3 $query->orWhere(...);
4 }),

If you do not add the searchable() method then the column will not be included when searching the term.

For more advanced search abilities, take a look at the search filter docs.