-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[6.x] Allow developer to preserve query parameters on paginated Api resources #30745
Conversation
Yeah this feels a lot better. Thanks. |
Maybe rename the method to something less verbose? Thinking |
Co-Authored-By: Dries Vints <[email protected]>
Co-Authored-By: Dries Vints <[email protected]>
Co-Authored-By: Dries Vints <[email protected]>
* | ||
* @var bool | ||
*/ | ||
protected $queryParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe shouldPreserveQueryParamters
would be better and expressive.
Documentation will need to be added to laravel/docs for the new |
Reattempt at #30729 without static configuration.
Instead of statically configuring it once, the developer would have to call
->preserveQueryParameters()
after instantiating the Resource Collection, but I still like the DX with this case.