Group by multiple columns in Laravel

前端 未结 4 684
小鲜肉
小鲜肉 2020-12-09 15:41

How to GROUP BY multiple column in Laravel? I tried this code:

$routes = DB::table(\'route\')
    ->groupBy(\'rte_origin\')
    ->groupBy(         


        
4条回答
  •  误落风尘
    2020-12-09 16:23

    Edit your applications's database config file config/database.php

    In mysql array, set strict => false to disable MySQL's strict mode to make this work.

提交回复
热议问题