Skip to main content

Adding the Advanced Tables trait

To use Advanced Tables, you need to add the AdvancedTables trait to your component. However, as Advanced Tables overrides multiple methods in Filament’s InteractsWithTables trait, adding the AdvancedTables trait to the table will cause a conflict. For convenience, Advanced Tables includes a Page class which you can use to quickly get up and running:
use Archilex\AdvancedTables\AdvancedTables;
use Archilex\AdvancedTables\Livewire\Page;

class ListUsers extends Page
{
    use AdvancedTables;

    ...
Of course, there are multiple ways to prevent the trait conflict. The important part is to ensure that the AdvancedTables trait is used on a class that extends another class which contains Filament’s InteractsWithTables trait.

Adding the view component to your blade file

You also need to add the Favorites Bar component to your blade file:
<div class="space-y-6">
    
    <x-advanced-tables::favorites-bar />

    {{ $this->table }}
</div>
The Favorites Bar expects a space of 24px to properly display it’s links. This can easily be achieved with Tailwind’s space-y-6 class as shown above.