Skip to content

[12.x] Fix return empty Collection for non-model JSON:API resources#58752

Merged
taylorotwell merged 1 commit intolaravel:12.xfrom
noir4y:fix-json-api-array-resource
Feb 11, 2026
Merged

[12.x] Fix return empty Collection for non-model JSON:API resources#58752
taylorotwell merged 1 commit intolaravel:12.xfrom
noir4y:fix-json-api-array-resource

Conversation

@noir4y
Copy link
Contributor

@noir4y noir4y commented Feb 11, 2026

Fixed JSON:API included resource resolution for top-level, array-based custom resources.

resolveIncludedResourceObjects() was returning an array [] for non-model resources, despite the method contract being Collection.

This change now returns an empty Collection instead.

@taylorotwell taylorotwell merged commit 244449a into laravel:12.x Feb 11, 2026
71 checks passed
@noir4y noir4y deleted the fix-json-api-array-resource branch February 12, 2026 06:14
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.

2 participants