-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor based pagination #39
Comments
Hi! Your solution of using the filter method is the best approach at the moment. We're planning a lot of upgrades to the search solution, including the pagination. Out-of-the box pagination support will only ever exist for the pagination strategy implemented by Laravel, which is page based. But we're hoping to make it a lot easier to tie in pagination for specific resource types that need their own pagination approach, e.g. cursor based as you need. Any suggestions as to how you'd like to integrate cursor based pagination would be appreciated. I'll leave this issue open as it is related to our plans to upgrade the search functionality. |
The latest version This means you can implement cursor based pagination by writing a class that implements Any questions let me know. |
I didn't find anything on a cursor based pagination which is allowed by the spec. This sort of pagination is very useful and common in an API, specially if coupled with an index of sort (alphabetical mostly):
How would you go about implementing this?
For now, I don't see another way than bypassing your pagination and using the filter method on the Search class to 1/ manually paginate via skip/take and 2/ clone the builder to create the alphabetical index. But then I don't see how to manually create the meta and links objects and pass them to the returned Json.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: