thinkphp5 查询数据返回layui 表格后出现错误:call_user_func_array() expects parameter 1 to be a valid callback, class 'think\Collection' does not have a method 'order'
$list = Db::name('user')
->where($where)
->paginate(['page'=>$page,'list_rows'=>$list_rows])
->order('commission_time desc')
->each(function ($item) {}
修改成:
$list = Db::name('user')
->where($where)
->order('commission_time desc')
->paginate(['page'=>$page,'list_rows'=>$list_rows])
->each(function ($item) {