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

Eloquent

Every DataTable component must define a base query, which is the start of the query that will be appended to for the rest of the components included functionality.

Right now only Eloquent models are supported.

1public function query(): Builder
2{
3 return User::query();
4}

The query is where you will append custom searching and filters later in the documentation. You should also eager load any relationships you need here as well.

Make sure your query includes a column to be used as the primary key.