解决TP8使用paginate分页报错think\\db\\BaseQuery::paginate(): Argument #1 ($listRows) must be of type array|int|null, string given, called in问题
使用ThinkPHP8分页时报如下错误:think\\db\\BaseQuery::paginate(): Argument #1 ($listRows) must be of type array|int|null, string given, called in D:\\ProgramFiles\\phpstudy_pro\\WWW\\tp8.cc\\app\\union\\controller\\Role.php on line 44仔细看下下方代码,看着是没问题的。//获取每页显示的条数
$limit= $request->param('limit');
//获取当前页数
$page= $request->param('page');
$where=[];
$role_list=Roles::where($where)
->order('id', 'desc')
->paginate($limit,false,['page'=>$page])
-&