Badge N + 1 problem

As the title suggests, whenever I use getNavigationBadge() method, it somehow queries twice.


public static function getNavigationBadge(): ?string
{
return static::getModel()::count();
}
Was this page helpful?