-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Needs investigationNeed investigation about bugs described in issueNeed investigation about bugs described in issuebug
Description
Summary
When calling the ->paginate()
method with the first (perPage
) argument, mongodb errors if the user passes in a string.
Steps to reproduce
- pass
per_page=20
as a query parameter on an application running this library - use
->paginate($request->input('per_page'))
in the called method - get a Mongodb error
the limit must be specified as a number
Fix
We should cast the $perPage
argument to an integer before passing to mongodb; this works in the default Laravel drivers, and should work with this driver. This can be easily solved by a simple (int)
cast
Christophvh and carlosmolanocarlosmolano
Metadata
Metadata
Assignees
Labels
Needs investigationNeed investigation about bugs described in issueNeed investigation about bugs described in issuebug