记laravel order by 问题
作者:互联网
向wherey一样直接在order 后面再加一层order
例子:
\App\Models\Goods::from('goods as g')->select('*')-orderBy('g.sort_order', 'desc')->offset($begin)->limit($size)->get()->toArray();
\App\Models\Goods::from('goods as g')->select('*')->orderBy('g.sort_order', 'desc')->orderBy('g.goods_id', 'desc')->offset($begin)->limit($size)->get()->toArray();
标签:laravel,orderBy,goods,sort,问题,order,select,desc 来源: https://www.cnblogs.com/liiu/p/13985464.html