Replies: 1 comment
-
Hello! Thanks for sharing your showcase. Just for clarifying: on filament docs: https://filamentphp.com/docs/3.x/panels/tenancy#tenancy-security it's clear that filament does not will scope everything. Filament will basicly scope resources and assing the correct tenant_id to created models, almost almost everything else you will have to scope manually. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I struggled on this for the last 30 minutes so I share, just in case.
I use the
Multi-tenancy
feature in my current project:Companies
(tenants) sellingProducts
toClients
.Each Company has its own Clients, but Products are the same for all Companies:
In my
ListClients
andListProducts
pages, I want to have a filter showing the ACTIVE records with count.I followed the documentation and couldn't understand why the count was correct for the
Products
but not for theClients
.After a while, I discovered that the
->badge()
query isn't scoped to tenants.So I had to add an extra -
>where()
for the Clients:Hope this will help someone!
Beta Was this translation helpful? Give feedback.
All reactions