Closed rebootcode closed 7 years ago
@rebootcode Please post some more information if you still haven't found a workaround and re-open the issue.
Alright! what i mean was :-
The datatable populates :- title, excerpt, status , publish_date, user_id, action
But i was looking for the way, where i could replace user_id
with "name" of the user from user
table
Thanks
To the query, add the eagerload and use the select to avoid mixing fields. To the column, add the wanted field.
public function query()
{
$bookings = Booking::query();
$bookings->with('user')->select('bookings.*');
return $this->applyScopes($bookings);
}
'user_id' => ['name' => 'user.name', 'data' => 'user.name', 'title' => 'User'],
I have certain article table and with user id option.
In Article page, i see list of all user id, but i want to see "name" of user instead of "id".
How can this be done.
** No foreign key used.