Skip to content
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

[10.x] Simplifies collection customisation #46217

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

timacdonald
Copy link
Member

This makes is much easier to change the collection type of a JsonResource while still maintaining the preserveKeys functionality.

Classes can now just extend the newCollection method and return their own custom implementation.

I've wanted this while building out my JSON:API resource package.

@taylorotwell taylorotwell merged commit ad021d8 into laravel:10.x Feb 22, 2023
@timacdonald timacdonald deleted the resource-collection branch February 23, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants