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

fix(laravel): visible and hidden fields support #6538

Merged
merged 4 commits into from
Aug 23, 2024

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Aug 22, 2024

Q A
Branch? main
Tickets n/a
License MIT
Doc PR n/a

Model::$visible is an allow list. If it is defined, only fields explicitly listed in the array must be visible.
This patch fixes the issue and adds some tests for the feature.

According to the docs, it's also possible to hide the field for an instance by using makeVisible() and makeHidden().
I may be wrong, but this feature doesn't seem to be currently supported. This should be fixed in a follow-up PR.

@soyuka soyuka merged commit 4ee209e into api-platform:main Aug 23, 2024
56 of 59 checks passed
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