不带参数:
$rs = Db::name('admin')->order(['id'=>'desc'])->paginate(1);
带参数传递:
$rs=Db::name('admin')->where($where)->order(['id'=>'desc'])->paginate(10,false,['query' => request()->param()]);
['query' => request()->param()],有多少个参数传递都会自动给你增加上,不用一个一个参数这样子写的(->paginate(10,false,['query' => ['cate_id'=>$cate_id], ['keyword'=>$keyword]]); )
---------------------
作者:我是高手高手高高手
来源:CSDN
原文:https://blog.csdn.net/haibo0668/article/details/80805802
版权声明:本文为博主原创文章,转载请附上博文链接!
paginate(10,false,['query' => request()->param()]);
参考
https://blog.csdn.net/h330531987/article/details/78319595