[英]Laravel pagination add page number
Am sending a get request and adding the pagination value but now i would like to attach the page 我正在发送获取请求并添加分页值,但现在我想附加页面
So in my URL I have 所以在我的网址中
http://localhost:8080/users?paginator=10&page=1
The value of page and paginator are controlled from frontend(angular4) 页面和分页器的值由frontend(angular4)控制
So in my controller I have 所以在我的控制器中
class UserController extends Controller{
public function index(){
return User::paginate($request->paginator);
}
}
The above works for the paginator value but now how do I attach the page number? 以上适用于分页器值,但是现在如何附加页码?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.