wezlo/filament-search-spotlight
Full-screen Spotlight/command-palette search for Filament panels (⌘K/Ctrl+K). Aggregates global search records plus resources, pages, and actions, with recent/pinned items stored in localStorage. Keyboard navigation, configurable per panel and via config.
Pros:
GlobalSearchProvider and resource architecture. Minimal boilerplate required (plugin registration + optional config).RecordsCategory for a custom implementation).localStorage, avoiding server-side state management. Ideal for user-specific preferences without DB migrations.SpotlightAction API enables dynamic, context-aware actions (e.g., logout, cache clearing) with keywords for discoverability.@source directive, preventing utility class purging.Cons:
getGloballySearchableAttributes()). May require wrappers for non-Filament Laravel apps.composer require) + plugin registration. No migrations, routes, or middleware required.⌘K/Ctrl+K binding might clash with existing shortcuts (e.g., Monaco editor). Configurable via keyBinding().resultLimitPerCategory().Filament Version Compatibility:
filament()->getLogoutUrl())Search Customization:
RecordsCategory?Action Scoping:
Accessibility:
Multi-Panel Support:
localStorage persistence work across multiple Filament panels in the same app?Upgrade Path:
spatie/laravel-searchable for server-side indexing.SpotlightAction usage via Laravel Mixins or Filament’s event system.Pilot Phase:
admin.test).npm run build to deployment scripts).Core Integration:
PanelProvider:
->plugins([
FilamentSearchSpotlightPlugin::make()
->keyBinding('mod+k')
->excludeResources([AuditLogResource::class])
->action(SpotlightAction::make('custom-action')->...),
])
php artisan vendor:publish --tag=filament-search-spotlight-config).Customization:
RecordsCategory for a Scout-powered search).AppServiceProvider::boot():
SpotlightAction::make('export-data')
->label('Export CSV')
->keywords(['export'])
->url(fn () => route('admin.exports.csv'))
->register();
Rollout:
->disableDefaultGlobalSearch()) to avoid duplication.localStorage usage in production (e.g., via browser dev tools).composer.json for filament/support version constraints.wezlo/filament-search-spotlight’s composer.json.localStorage, Mousetrap.js). Test in target browsers (e.g., Chrome, Firefox, Safari).composer require wezlo/filament-search-spotlightPanelProvider.⌘K trigger and keyboard navigation.localStorage errors or performance issues.wezlo/filament-search-spotlight updates (if views change).resources/lang/ (package doesn’t provide a translation loader).wezlo/filament-search-spotlight for security patches (low risk; no direct DB access).⌘K fails (e.g., event listeners in other plugins).spotlight.recent/spotlight.pinned keys if data becomes stale (client-side tooling).GlobalSearchProvider implementation in resources.excludeResources() or overrideActions() config.@source directive is included and assets rebuilt.localStorage for recent/pinned items.storage/logs/laravel.log.php artisan test --compact tests/Feature/FilamentSearchSpotlight to validate core functionality.How can I help you explore Laravel packages today?