Laravel Livewire Tables Documentation

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

This is the documentation for 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

Component Columns

Component columns let you specify a component name and attributes and provides the column value to the slot.

1// Before
2Column::make("Email", "email")
3 ->format(function ($value) {
4 return view('components.alert')
5 ->with('attributes', new ComponentAttributeBag([
6 'type' => Str::endsWith($value, 'example.org') ? 'success' : 'danger',
7 'dismissible' => true,
8 ]))
9 ->with('slot', $value);
10 }),
11 
12// After
13ComponentColumn::make('E-mail', 'email')
14 ->component('email')
15 ->attributes(fn ($value, $row, Column $column) => [
16 'type' => Str::endsWith($value, 'example.org') ? 'success' : 'danger',
17 'dismissible' => true,
18 ]),

Please also see the following for other available methods: