UsersRelationManager
i have a groups resource with a UsersRelationManager where is_owner can acess but in the table i dont want to appear in the table so i dont acidently delete myself from that group...
I tried something like this:
but i still appear in the table
3 Replies
Looks good. Is this on the UserResource?
If it's only about deleting, you could also disable delete action for you user:
no, its in the GroupResource with a getRelations
in my FilamentServiceProvider i made it so only a is_owner can access this RelationManager being redirected to the edit of his group, so it would make sense the user can delete other users, just not himself
this approach worked but still im not satisfied that myself has a owner appear in the table
Sorry, when I looked at the code, I forgot about the relation manager again. Overwire
getTableQuery()
on the relation manager instead of getEloquentQuery()