Overview
The Search Counts feature displays result counts in your global search modal, helping users understand the scope of their search results. You can show total counts across all categories or individual counts per category group.
Basic Usage
Enable search counts in your panel provider:
GlobalSearchModalPlugin::make()
->showTotalSearchCounts()
->showGroupSearchCounts()
Method Signatures
->showTotalSearchCounts()
->showGroupSearchCounts()
Both methods can be used together or independently based on your UI needs.
Display Options
Total Search Counts
Shows the overall number of results across all categories:
->showTotalSearchCounts()
Example output: "total count: 23" at top
Group Search Counts
Shows individual counts for each category:
->showGroupSearchCounts()
Example output:
- Posts (12)
- Users (8)
- Settings (3)