F
Filament15mo ago
Hurruwa

getNavigationBadge() wont count the model

Im probably doing something wrong but... this its not working for me. This is my code:
protected static function getNavigationBadge(): ?string
{
return debug(static::getModel()::count());
}
protected static function getNavigationBadge(): ?string
{
return debug(static::getModel()::count());
}
Any idea?
1 Reply
Hurruwa
Hurruwa15mo ago
The thing is that im counting the model and displaying the amount on he badge (in this example on the debugbar) but it wont show the count for get it, it was my global scope, its working