You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to laravel-datatables 8 and datatables.net 1.10.15 I have problems with ordering a column. I use several joins to get my data which creates the situation that certain column names become ambiguous when querying without the table name.
I try to sort on the created_at column on the students table.
My backend code:
$students = Students::join(... // join all tables$students->select('students.created_at', // ... other columns, etc.return \Datatables::of($students)
->editColumn('students.created_at', '{!! \Carbon\Carbon::parse($created_at)->toDateString() !!}')
->make(TRUE);
Front-end code:
columns: [{data: 'created_at',name: 'students.created_at'},// other columns
After upgrading to laravel-datatables 8 and datatables.net 1.10.15 I have problems with ordering a column. I use several joins to get my data which creates the situation that certain column names become ambiguous when querying without the table name.
I try to sort on the
created_at
column on thestudents
table.My backend code:
Front-end code:
When sorting on created_at I get the error:
and the query ends with
order by "created_at" desc
.Why does the order function remove the table name when creating the query?
The text was updated successfully, but these errors were encountered: