Relation Manager policies
Hello guys!
I'm implementing policies on my project and get a problem.
I utilize the Relation Manager (attach) on some of my "policiedidk if is correct to spell that way" resources. When i try to attach any register, all of them appears, like the example:
I have a BusinessResource, that attaches Places with RelationManager, but when my user type is "user" instead "superuser", i need to search only places that have
I will attach some files to try explain how i doing the policies.
To filter on the list, i use the
I'm implementing policies on my project and get a problem.
I utilize the Relation Manager (attach) on some of my "policied
I have a BusinessResource, that attaches Places with RelationManager, but when my user type is "user" instead "superuser", i need to search only places that have
owner_id === auth()->user()->id.I will attach some files to try explain how i doing the policies.
To filter on the list, i use the
getEloquentQuery method, see bellow, but didnt work to attaches select:BusinessResource.php5.45KB
PlaceResource.php6.11KB