How to GROUP BY multiple column in Laravel? I tried this code:
GROUP BY
$routes = DB::table(\'route\') ->groupBy(\'rte_origin\') ->groupBy(
Put the select before the groupBy and the arguments in brackets.
select
groupBy
$routes = DB::table('route') ->select(['column_1', 'column_2']) ->groupBy(['column_1', 'column_2']) ->get();