laravel
laravel copied to clipboard
Field-level authorization, simplest-possible example
Hello, I've noticed that in 3 issues as well as the documentation: https://laraveljsonapi.io/docs/1.0/requests/authorization.html#relationship-authorization
It's mentioned that it's possible to do field-level authorization by writing ones own authorizer. Can someone please provide a short example? I wasn't able to do it.
I just want to limit the display of a specific field to $user->can('view sensitive data') or something like that.
Thanks,