F
Filament2mo ago
gasa

null returned for Filament::getTenant() on a second panel

Hi, I am trying to getTenant on my second app panel. I can see tenant when i call the function on the admin panel.
public function canAccessPanel(Panel $panel): bool
{

if ($panel->getId() === 'admin') {
info('getTenant admin' . Filament::getTenant());
return true;
}

if ($panel->getId() === 'app') {
info('getTenant app' . Filament::getTenant());
return true;
}


return $this->hasRole('admin');
}
public function canAccessPanel(Panel $panel): bool
{

if ($panel->getId() === 'admin') {
info('getTenant admin' . Filament::getTenant());
return true;
}

if ($panel->getId() === 'app') {
info('getTenant app' . Filament::getTenant());
return true;
}


return $this->hasRole('admin');
}
when i go to admin panel i can see the return value, but on app panel i can only see null
1 Reply
toeknee
toeknee2mo ago
have you enable tenancy on the second panel?
Want results from more Discord servers?
Add your server