我用url中的perPage和页面发送我的请求。那是
url = users?page=0&perPage=10 //the get http url
所以我想对我模型请求进行分页,比如并指定页面和perPage
User::paginate()
因此,在文档中,我看到我可以添加perPage,但我不知道如何添加页面。在laravel documentation中,我看到您可以像这样添加perPage
User::paginate($request->get('perPage')) //perPage from url request
但是,现在如何将页面参数添加到分页,以便可以指定类似于0的页面值
HOw我要继续吗?
我还检查了This question,但它没有显示如何在雄辩的模型分页中设置它
https://stackoverflow.com/questions/56517666
复制相似问题