F
Filament2mo ago
kian

Resource without tenancy inside the same panel

I'm trying to make a resource without a tenancy inside a multi tenancy panel. I know there is an option to disable the tenancy scope, but this is only a part of what I'm looking for. I want the slug of the resource to also not contain the tenancy. This is for an invitation system im working on, users should be able to go to /dashboard/invitations instead of /dashboard/<organisation (the tenancy)>/invitations
Solution:
Yeah i was just thinking too hard I guess, you can easily make a custom page with a table on it and I've then registered it like this:
->routes(fn () => Route::get('my-invitations', MyInvitations::class)->name('pages.my-invitations'))
->routes(fn () => Route::get('my-invitations', MyInvitations::class)->name('pages.my-invitations'))
My only question left if there is a different way of registering the route...
Jump to solution
9 Replies
kian
kianOP2mo ago
If this is not possible, then I want to make a custom page with a table on it, but I think you also need a resource for that to work, so I wont be able to do that either
kian
kianOP2mo ago
Yes I did, that disabled the scope, but not the slug in the url
Tieme
Tieme2mo ago
This is for an invitation system im working on, users should be able to go to /dashboard/invitations instead of /dashboard/<organisation (the tenancy)>/invitations So any tenant can see any invatition from any tenant? Or what do you want to achief?
kian
kianOP2mo ago
Yes, a user should have a list of all tenants they are invited for, so they can choose which to join
Tieme
Tieme2mo ago
cant you rewrite the https://filamentphp.com/docs/4.x/users/tenancy#adding-a-tenant-registration-page because without tenant you cant login or need to register a tenant?
kian
kianOP2mo ago
I could do that, but that displays a form instead of a table And i think extending a RegisterTenant class wouldnt be a good idea I think i found the solution hold up
Solution
kian
kian2mo ago
Yeah i was just thinking too hard I guess, you can easily make a custom page with a table on it and I've then registered it like this:
->routes(fn () => Route::get('my-invitations', MyInvitations::class)->name('pages.my-invitations'))
->routes(fn () => Route::get('my-invitations', MyInvitations::class)->name('pages.my-invitations'))
My only question left if there is a different way of registering the route
kian
kianOP2mo ago
I know the editprofile page does it, but i dont understand how

Did you find this page helpful?