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

[9.x] Allow base JsonResource class to be collected #40896

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

jwohlfert23
Copy link
Contributor

In some cases, my app is just using the base JsonResource like so:

return JsonResource::collection(User::take(10)->get());

This fails as the collects() method is only checking if the class is a subclass. It does not allow the base JsonResource class.

@driesvints driesvints changed the title Allow base JsonResource class to be collected [9.x] Allow base JsonResource class to be collected Feb 10, 2022
Co-authored-by: Dries Vints <dries@vints.io>
@taylorotwell taylorotwell merged commit 760c322 into laravel:9.x Feb 10, 2022
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

4 participants