Suggestion for improving default size (number of results) #49
marknuyens
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there, I've been using your package in my projects and found it kind of redundant to have to specify the default maximum number of pagination results in the configuration of your package, since this configuration may already be present on the Eloquent model itself.
I've written some pseudocode below to demonstrate what the desired outcome could look like. I suppose what I'm proposing is to accept a
NULL
value for the configureddefault_size
, in which case it will fall-back to the model's originalperPage
.I think this may help prevent code duplication by relying on Laravel's own Eloquent model. Anyway, before making any PRs I thought I'd check in first to hear what you have to say.
Anyway, hope this helps.
Beta Was this translation helpful? Give feedback.
All reactions