Closed kastoras closed 5 years ago
Finally i have found a solution, it wasn't hard to do.
I used query method and join the related table.
Hi @kastoras, yes you can use the query
like below
public function query($query){
return $query->with('my-relation');
}
Or you use the auto detect functionality. In your tableModel you can pass relations in the $columns
array.
public $columns = [
'id',
'my-relation.id' //<== this will be autoloaded
];
Hello,
if i have a model that is related with another model, is there any simple way to show related value at datatable column?
Thanks in advance.