Laravel Livewire Tables Documentation

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

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

Upgrade Guide

This may not be an exhaustive list, please check out the examples for further clarification.

Upgrading from version 1 to version 2:

Public properties were replaced by their configuration method counterparts.

For example:

In v1:

1public string $primaryKey = 'id';

In v2:

1public function configure(): void
2{
3 $this->setPrimaryKey('id');
4}

The query can be defined in multiple ways

In version 1, the query was defined with the query() method. In version 2, the query is either defined with the builder() method or the $model property.

Columns now have different types

In version 1, there was just one Column class. In version 2, there's that same class but also other classes for specified uses, i.e BooleanColumn.

Filters now have different types

In version 1, there was just one Filter class In version 2 there is a different filter class for each type of filter.

Applying filters

In version 2, you can apply filter queries at the filter level.

But if you choose to use the old method of applying filters at the builder level, the method to grab the filter value is different.

Old:

1$this->getFilter('active');

New:

1$this->getAppliedFilterWithValue('active');

Modals

modalsView() was changed to customView()