FilamentF
Filament15mo ago
jjo63

Adding a record count alongside a navigation link

Hi could you point me to the feature that enables the display of the number of orders (in this case 193) shown in the attached?

I can see it's related to the number of "new" orders - just need to understand how the number gets put there.

I have had a look at the source code on github and see the navigation title definition here

    protected static ?string $navigationGroup = 'Shop';

    protected static ?string $navigationIcon = 'heroicon-o-shopping-bag';


Anyone able to point me to the documentation or the relevant file within github?

thx
j
image.png
Solution
public static function getNavigationBadge(): ?string
{
    return 420;
}


This in your resource class if i'm correct
Was this page helpful?