-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
make Model::paginate() use default perPage from Config\Pager->perPage if $perPage parameter not passed #2782
make Model::paginate() use default perPage from Config\Pager->perPage if $perPage parameter not passed #2782
Conversation
I've added unit test for use case change config('Pager')->perPage and passed parameter |
travis build green 🎉 |
331f72b
to
95165e4
Compare
I've added check in |
…Page() pulled from Pager instance to get final perPage value
I moved the handle per page null check to Pager class, use |
I updated |
travis build green 🎉 |
Definitely a good change, and a solid PR. Thanks as always @samsonasik |
Currently, the
$perPage
is default to20
inModel::paginate()
function. I think it should read fromconfig('Pager')->perPage
instead. I apply make default to null, and check if it is not passed, it will use the defaultconfig('Pager')->perPage
Checklist: