rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.75k stars 330 forks source link

Table with relation column not working currently in v2 branch #598

Closed christian-forgacs closed 2 years ago

christian-forgacs commented 2 years ago

In branch v2 you can't use relations for a column. For example:

...
Column::make(__('Number of Assigned Districts'), 'districts.name')
...

Throw following error:

Rappasoft\LaravelLivewireTables\Views\Column::setTable(): Argument #1 ($table) must be of type string, null given, called in /var/www/html/vendor/rappasoft/laravel-livewire-tables/src/Traits/Helpers/ColumnHelpers.php on line 24

In v1 it works great and in the row template I can use the row relation and as well for search.

rappasoft commented 2 years ago

I'm not ready to start receiving issues for v2 as it is no where near done. However right now the relationships are limited to hasOne and belongsTo.