Scopes not applied to relations in getEloquentQuery
In my case I have
Tenant
and Address
models that are connected with each other. The Address
has tenant_id
so a user can only display its own addresses through his own tenant. I have a TenantResource
only for admins where all tenants are listed including their address and country code.
My issue is that in the code below the getEloquentQuery
global scopes get ignored but when defined in the model it works.
Isn't this actually the same?
1 Reply
Sorry, this was not solved. I tried it acutally with tinker and in tinker it works, its just the getEloquentQuery() that ignores this stuff...