User administration for tenants
I would like to have a page where the tenants can manage their members, ie. change role/profile information and invite new members.
If I simply make a resource for the Organization model (which is my tenant model) and make a relationshipManager on that, then I can access the organization and modify the user and pivot attribute.
But I want the tenants to be able to do that also, but obviously only for their current tenant...
Any ideas how to do this the best way?
Solution:Jump to solution
Overwrite the
getEloquentQuery()
method on the Resource and add a ->where()
clause when the user is a tenant2 Replies
Solution
Overwrite the
getEloquentQuery()
method on the Resource and add a ->where()
clause when the user is a tenantThanks, that actually works wonders, although the url becomes a bit redundant, by having the ID 2 times "/admin/3/organizations/3/edit"
Ideally it should just be /admin/3/organization or something like that