I have tried solutions in other questions but that is not solving my issue. I have made strict from true to false. Used modes
'modes' => [
'STRICT_TRANS_TABLES',
'NO_ZERO_IN_DATE',
'NO_ZERO_DATE',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION'
]
as well. But I am getting the same error.
$orders = Order::orderBy('id', 'desc')->groupBy('order_id')->get();
dd($orders);
This is throwing the error
Syntax error or access violation: 1055 'my_db.orders.id' isn't in GROUP BY (SQL: select * from
orders
group byorder_id
order byid
desc)
(I am using Laravel 5.6)