Skip to content
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

Fix MongoDB throwing error when perPage is string #107

Closed
wants to merge 2 commits into from

Conversation

Swanty
Copy link
Contributor

@Swanty Swanty commented Dec 28, 2020

Hello, we're using MongoDB in our Laravel project and it seems to require strictly integer type when passing the limit for pagination.
Whenever you attempt to change Per Page in frontend it will replace $perPage to a string type and when render function calls paginate it will throw error.

This pull request fixes it, but not sure if it is the right place where to type cast.

Hello, we're using MongoDB in our Laravel project and it seems to require strictly integer type when passing the limit for pagination.
Whenever you attempt to change Per Page in frontend it will replace `$perPage` to a string type and when `render` function calls `paginate` it will throw error.

This pull request fixes it, but not sure if it is the right place where to type cast.
@rappasoft rappasoft mentioned this pull request Apr 14, 2021
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant