Im building a RESTful webservice and when a user requests a collection I want them to be able to specify a limit and a starting point as URL-params.
Currently i'm calling paginate on my Eloquent model and giving the limit as an argument. However I cant find a way to let users specify a starting point as URL-param.
I hope everything is clear, and someone has a solution to my problem.
However let me clarify what I mean by starting point. I want my users to be able to specify a specific item within a collection as starting point of the response.
So when a user posts a GET request to 'myawesomeapp.dev/api/v1/games?limit=2&start=5' they get a paginated result starting at item nr.5 in the collection.