F
Filamentβ€’5d ago
Alex'R

Redirect to the same resource after selecting a Tenant

Hi, Although I searched the documentation, I couldn't find anything allowing a user to be redirected to the same type of resource when they select a tenant in their lite. Is this possible? Thanks to you
Solution:
Add it to resources/views/vendor/filament-panels/components/tenant-menu.blade.php...
Jump to solution
8 Replies
toeknee
toekneeβ€’5d ago
I build this in with a custom tenant menu. The problem you can have is the tenant needs access in the end I do a rough view creation for now. In theory you could have a middleware, that swaps the tenant and checks if the URL is accessible if so redirect, if not go up a level, if not go up a level till it can redirect
Alex'R
Alex'ROPβ€’5d ago
Okay, so maybe a custom tenant menu is the best idea. my users have the same permissions for all tenants so I can just keep the base url to redirect on the same after tenant change.
toeknee
toekneeβ€’5d ago
Feel free to use mine
Solution
toeknee
toekneeβ€’5d ago
Add it to resources/views/vendor/filament-panels/components/tenant-menu.blade.php
Alex'R
Alex'ROPβ€’5d ago
Nice ! Thanks you very much. It works perfectly πŸ™‚ πŸ™‚
toeknee
toekneeβ€’5d ago
You may get issues on custom page views, which is why I built an exclusion i.e. activities
Alex'R
Alex'ROPβ€’5d ago
Yeah I see. The most important page is the index resource, It looks logical a user can not go to an another edit or view page. You made my day, thanks a lot πŸ™‚
toeknee
toekneeβ€’5d ago
Welcomes

Did you find this page helpful?