F
Filament8mo ago
Wim

Multi-tenancy: don't show tenancy menu when individual user

I have setup multi-tenancy according to the information here. I know I can use tenantMenu(false) as I did below.
public function panel(Panel $panel): Panel
{
return $panel
->id('app')
->path('app')
->tenant(Organization::class, ownershipRelationship: 'organizations')
->tenantRegistration(RegisterOrganization::class)
->tenantProfile(EditOrganizationProfile::class)
->tenantMenu(false)
public function panel(Panel $panel): Panel
{
return $panel
->id('app')
->path('app')
->tenant(Organization::class, ownershipRelationship: 'organizations')
->tenantRegistration(RegisterOrganization::class)
->tenantProfile(EditOrganizationProfile::class)
->tenantMenu(false)
However, I want to do this only when a user is an individual. In my database I have a table organizations that has a column is_individual. How can I change is to that only organizations see the menu whereas individual users don't get to see it. Or would I need two panels: one for individuals and one for organizations?
1 Reply
Tim van Heugten
Tim van Heugten8mo ago
Did you try using a closure in tenantMenu()?
Want results from more Discord servers?
Add your server