cswni/filament-spotlight
Filament Spotlight adds a fast, keyboard-driven command palette to your Filament panels, letting users quickly jump to resources, pages, and records without navigating menus. Simple to install and configure for faster admin workflows.
The 1.0.0 release is the first stable tag for cswni/filament-spotlight, but the release notes contain nothing except an auto-generated changelog link. Treat the tag as a signal ("API is now considered stable") rather than a feature announcement, and read the repository README and the 1.0.0 commit list before adopting — there is no migration guide because there is no prior stable version to migrate from.
Minimal adoption path:
composer require cswni/filament-spotlight — pin it ("^1.0") now that a stable tag exists; pre-1.0 installs should be bumped deliberately, since dev-main code may have shifted into the tagged release.panel() method of your PanelProvider:->plugins([
\Cswni\FilamentSpotlight\SpotlightPlugin::make(),
])
php artisan filament:assets (and php artisan optimize:clear in a cached environment) so the plugin's JS/CSS lands in public/.Cmd/Ctrl + K). If nothing appears, check the browser console first — a missing asset or a Livewire/Alpine version mismatch is far more common than a config problem.First use case: global resource/page navigation. Before you invest in custom providers, confirm that the palette lists your Filament resources, their pages, and the cluster/navigation groups you expect. That single flow is where 90% of the value sits for day-to-day admin users, and it exercises the plugin's resource-introspection code, which is the part most sensitive to your Filament major version.
Panel-scoped registration. Register the plugin only where it belongs. In multi-panel apps (e.g. admin + app), adding it to the admin panel keeps the palette out of customer-facing surfaces and avoids leaking resource labels to the wrong audience. If two panels share resources, prefer explicit per-panel registration over a shared base provider.
Replace, don't duplicate, Filament's global search. Filament ships a global search modal on the topbar. Running Spotlight alongside it produces two near-identical search affordances and two sets of keybindings. Pick one: either disable the stock global search on the panel or skip Spotlight. Document the decision in the panel provider so the next developer doesn't "helpfully" re-enable the other.
Custom commands as the primary extension point. The day-to-day pattern is registering app-specific actions — "Create invoice", "Open today's orders", "Impersonate user" — as spotlight entries that resolve to a URL or dispatch a Livewire action. Keep these definitions in a dedicated service provider or a SpotlightRegistry-style class rather than scattering them through resource classes; a single file is far easier to review for authorization mistakes.
Authorization must be explicit. Palette items are navigation shortcuts, so anything that appears there is effectively an advertisement of an endpoint. Wrap every custom entry (and, where the plugin allows it, resource entries) in the same policy check the destination route uses — ->visible(fn () => Gate::allows('viewAny', Order::class)). Do not rely on the target page's own authorization as your only line of defence: an entry that 403s on click is a bad UX and a mild information leak (it confirms the resource exists).
Tenancy. In a tenanted panel, confirm that palette results are scoped to the current tenant. Resource introspection typically runs through the panel's resource list, which is tenant-scoped, but custom entries are your responsibility — inject Filament::getTenant() into any query you run inside a command's resolution callback.
Keybinding hygiene. If the plugin exposes a configurable shortcut, set it centrally (config or plugin method) rather than per-developer. Document it in your team's onboarding notes: users coming from the stock global search will instinctively reach for the old shortcut.
Testing. Assert palette contents in a feature test rather than manually clicking: instantiate the panel, resolve the plugin, and assert that expected labels appear and unauthorized ones do not. This is cheap insurance against a resource rename silently dropping an entry.
git log --oneline <old-sha>..1.0.0 in the vendor fork or GitHub compare view) before upgrading a production app. If you were on a dev- constraint, Composer will not move you to 1.0.0 automatically — you must change the constraint.composer update, re-run php artisan filament:assets. In production with php artisan optimize, a stale asset manifest means the shortcut does nothing with no server-side error.Cmd/Ctrl+K is claimed by browsers (address bar search), Slack-style embeds, and some editors. Test in Chrome, Safari, and Firefox before shipping to stakeholders; Safari in particular intercepts several Cmd combinations.Cache::remember for 30–60s) or omit dynamic badges entirely.wire:navigate interplay. In SPA-mode panels, confirm that navigating from the palette updates the URL and doesn't leave a stale modal in the DOM. If the modal lingers, it's usually an Alpine teardown issue — check for a duplicate x-data root.php artisan config:cache; closures in config files are the classic breakage. Prefer configuring via the plugin object in PanelProvider (code, not config) for anything non-scalar.php artisan about panel list, then whether the plugin is registered on that panel, then the browser console, then filament:assets. Palette visible but a section missing → the resource's shouldRegisterNavigation() or a policy is filtering it.How can I help you explore Laravel packages today?