gasa
gasa
Explore posts from servers
FFilament
Created by gasa on 10/29/2024 in #❓┊help
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
3 replies