Closed dhcmega closed 5 years ago
@dhcmega Once read this blog https://blog.infyom.com/how-to-display-relationship-data-into-yajra-datatables-with-infyom-laravel-generator
$appends attribute working fine in the new version of the generator as well
Your Solution:
On query() function need to return query like this
$model->newQuery()->with(['event.user']);
and need to add this one while getting datatable columns in getColumns() function
'user' => ['name' => 'event.user.full_name', 'data' => 'event.user.full_name']
Hi At first, with "old" way of generating the ModelDataTable.php file, if the model has this:
this would work:
But now, since a couple of month ago, with the new version of the generator, the DataTable file is very different and the $appends attribute is ignored.
Can any one tell me how to make it work again?
Thanks!