Am sending my request with perPage and page in the url. That is
url = users?page=0&perPage=10 //the get http url
So i would like to paginate my model request like and specify both page and perPage
User::paginate()
So looking in the docs i see i can add perPage but i cant see how to add the page. so from laravel documentation i see you can add the perPage like
User::paginate($request->get('perPage')) //perPage from url request
But now how do i add the page parameter to the paginate, such that i can specify page value like 0
HOw do i proceed?
I have also checked on This question but it doesnt show how to set it in an eloquent model paginate