我想这么做:
App\Eating::Where('student_id', 2)->orderBy('created_at', 'DESC')->groupBy(function ($row) {warning: strtolower() expects parameter 1 to be string, object given in D:\Folder\vendor\laravel\framework\src\Illuminate\Database\Gramma
unrestrict`) as sumUnrestrict, SUM(`quarantine`) as sumQuarantine'))->with(['materialDescription'])->orderBy('mat_no')->groupBy('mat_no')->get();Syntax error or access violation: 1055 'wockhardt_indigo.stock_levels.id