-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cursorPaginate is not working #2408
Comments
Can confirm! I've found previous issue, and it was marked as implemented: #2312 But it still does not work |
Hello, Sorry, can't release a new version. Follow up here #2365 Thanks! |
@divine so there is no reason to close issue, until it is fixed. Please keep it open, until fix is released |
Hello, The new version was published. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
When trying to use the cursorPaginate method, it only works when the integer is equal to or higher than the total count of documents in the collection.
When I have 3 documents in my stores collection, I have to use cursorPaginate(3) in order for it to return the results.
Any integer lower than the total document count results in an error.
Steps to reproduce
Store::orderBy('_id', 'desc')->cursorPaginate(3, ['_id', 'name']);
Store::orderBy('_id', 'desc')->cursorPaginate(2, ['_id', 'name']);
Expected behaviour
When using cursorPaginate(2) I would expect it to return 2 results and have a next_cursor value.
Actual behaviour
I receive the following error message:
"array_flip(): Can only flip string and integer values, entry skipped"
Logs:
Insert log.txt here (if necessary)The text was updated successfully, but these errors were encountered: