Skip to content

Getting Started

Enable the plugin by adding it to your PanelsProvider's plugin method. You can then register your Spotlight items via ->registerItems(). This can be providers, queries or results.

php
use pxlrbt\FilamentSpotlightPro\SpotlightPlugin;use pxlrbt\FilamentSpotlightPro\SpotlightProviders\RegisterResources;

$panel->plugins([
    SpotlightPlugin::make()->registerItems([
        RegisterResources::make(),
        
        YourCustomQuery::make(),
        YourCustomCommand::make()    
    ])
])

More info on custom queries and commands can be found here:

Auto Discovery

Filament Spotlight Pro comes with built-in providers that will automatically register your pages, resources and some prebuilt commands.

You can use the following providers:.

The predefined queries rely on Filaments Global Search so make sure you have at least the $recordTitleAttribute set on your resources.

Restricting Spotlight Access

You can implement the canAccessSpotlight(Panel $panel) method on your User model to determine if a user can access the Spotlight.

Hotkeys

By default the hotkey to open the Spotlight are ⌘ + K and Ctrl + K to support common windows and macOS behaviour. You can change via the ->hotkeys() method:

php
SpotlightPlugin::make()->hotkeys(['ctrl.j', 'cmd.j'])