The Filament Table Builder is a TALL stack table component. You can use this table component as a standalone package, and it’s also included with the Admin Panel.
Using the package’s HasTable
interface and InteractsWithTable
trait, you can quickly build a table backed by an Eloquent query that you define:
1namespace App\Http\Livewire;
2
3use App\Models\Post;
4use Filament\Tables;
5use Illuminate\Contracts\View\View;
6use Illuminate\Database\Eloquent\Builder;
7use Livewire\Component;
8
9class ListPosts extends Component implements Tables\Contracts\HasTable
10{
11 use Tables\Concerns\InteractsWithTable;
12
13 protected function getTableQuery(): Builder
14 {
15 return Post::query();
16 }
17
18 public function render(): View
19 {
20 return view('list-posts');
21 }
22}
Beyond the basics, this package supports features that’ll make implementing an interactive table with Livewire a cinch:
- Customizable pagination
- Record searching via Laravel Scout
- Clickable rows
- Empty state
- Store table state in the query string
- Table column types (text column, image column, boolean column, etc.)
- Table filters
- Table actions
- Bulk actions
If you’d like to learn more about using the Filament Tables package with the TALL stack, check out the Table Builder documentation to get started!