控制器:
$data['type'] = 5;
$data['member_list'] = Member::orderBy('id', 'desc')->paginate(10);
return view('admin.member.index', $data);
视图
{{$member_list->appends(['type'=>$type])->links()}}
效果
/admin/member?type=5&page=2
控制器:
$data['type'] = 5;
$data['member_list'] = Member::orderBy('id', 'desc')->paginate(10);
return view('admin.member.index', $data);
视图
{{$member_list->appends(['type'=>$type])->links()}}
效果
/admin/member?type=5&page=2
本文标题:Laravel分页携带额外参数的实现方法
本文链接:https://www.haomeiwen.com/subject/dkowsftx.html
网友评论