© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Lucky0

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();
}
public static function getNavigationBadge(): ?string
{
return static::getModel()::count();
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Badge Column Problem
FilamentFFilament / ❓┊help
3y ago
How to avoid N+1 problem using eager laoding
FilamentFFilament / ❓┊help
2y ago
How can I avoid N+1 problem in custom views?
FilamentFFilament / ❓┊help
2y ago
nested repeater n+1 query
FilamentFFilament / ❓┊help
3mo ago