Filament::getTenant() returns null inside Resource::isScopedToTenant() method

I want to query all data if the tenant id is 1, but this is not working with filament v4
/**
* Merge all data if tenant id is 1
*/
public static function isScopedToTenant(): bool
{
return filament()->getTenant()->id !== 1;
}
/**
* Merge all data if tenant id is 1
*/
public static function isScopedToTenant(): bool
{
return filament()->getTenant()->id !== 1;
}
This code worked in v3
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?