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

show only some relationship attributes #46

Closed
dgillier opened this issue Feb 24, 2022 · 3 comments
Closed

show only some relationship attributes #46

dgillier opened this issue Feb 24, 2022 · 3 comments

Comments

@dgillier
Copy link

Hello,

Thanks for this great package !

I tried to hide some of the relationship attributes by using your $gdprVisible property with just the fields I want visible, working ok for the User model but not for the relationships.
(I tried to add some of the relationship attributes like 'bookings.name' in $gdprVisible, but it's not working)

Anyway to do that ?
Thanks, Denis

@andy-laravel
Copy link

I came here to ask the same question

@prattcmp
Copy link
Contributor

The only way I found to do this is not to use the $gdprXYZ attributes at all and just use toPortableArray().

@sander3
Copy link
Owner

sander3 commented Jan 26, 2024

You should be able to do so by adding a $gdprVisible array to the related model.

@sander3 sander3 closed this as completed Feb 28, 2024
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

No branches or pull requests

4 participants