Skip to content

Customization

Modify The Base Query

Override modifyDataQuery() when the listing needs joins, eager loading, tenant constraints, or custom base query conditions:

protected function modifyDataQuery(Builder &$query): void
{
    $query->where('tenant_id', auth()->user()->tenant_id);
}

Publish Views

Publish the package views when you need to customize markup:

php artisan vendor:publish --tag=livewire-datatables-views

Published views are placed in resources/views/vendor/livewire-datatables.

Publish Translations

php artisan vendor:publish --tag=livewire-datatables-translations

Icons And Classes

The default config exposes icon classes and button classes under the ui key. Publish the config and adjust these values if your Bootstrap icon setup differs.