You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 configured default_size, in which case it will fall-back to the model's original perPage.
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.
This discussion was converted from issue #48 on March 04, 2021 22:53.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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