How to load different ListPage based on permission on multi-tenant resource?
Hello,
I am using multi-tenancy on my Filament Project and using Spatie roles and permissions.
I am trying to load different ListPage on my resource based on the permission as you can see in the code below, but the getPages() doesn't recognize Filament::getTenant()->id which is causing the problem to check for the permission for the authenticated user.
My question is how do I make this load different index route based on the permission please?
Thank you
I am using multi-tenancy on my Filament Project and using Spatie roles and permissions.
I am trying to load different ListPage on my resource based on the permission as you can see in the code below, but the getPages() doesn't recognize Filament::getTenant()->id which is causing the problem to check for the permission for the authenticated user.
My question is how do I make this load different index route based on the permission please?
Thank you