Skip to content

[9.x] Add unless to JsonResource - #45419

Merged
taylorotwell merged 6 commits into
laravel:9.xfrom
michaelnabil230:features-json-resource
Dec 30, 2022
Merged

[9.x] Add unless to JsonResource#45419
taylorotwell merged 6 commits into
laravel:9.xfrom
michaelnabil230:features-json-resource

Conversation

@michaelnabil230

@michaelnabil230 michaelnabil230 commented Dec 24, 2022

Copy link
Copy Markdown
Contributor

This PR adds an unless method to the JSON resource class for retrieving a value if the given "condition" is (or resolves to) falsy.

Comment thread tests/Integration/Http/ResourceTest.php Outdated
taylorotwell and others added 2 commits December 29, 2022 19:56
Co-authored-by: kevinvanboeckholtz <113355556+kevinvanboeckholtz@users.noreply.github.com>
@taylorotwell
taylorotwell merged commit 8209afd into laravel:9.x Dec 30, 2022
@michaelnabil230
michaelnabil230 deleted the features-json-resource branch December 30, 2022 07:07
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.

3 participants