laravel自带分页修改参数

laravel框架自带了分页,用起来非常方便

现在我们想自定义当前页数及每页条数

> $builder = new user();
$apps = $builder::orderBy('id', 'desc')-\>paginate($request-\>input('pageSize',20),'*','current');
$builder = new user();
$list = $builder::orderBy('created_at','desc')->Paginate(10,['*'],'current',$request->input('current'));

    A+
发布日期:2020年10月16日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: