Skip to content

Customisation

You can customise most of the parts to fit your needs.

Translation

Labels are stored in language files and can be overwritten by creating files in the lang/vendor/filament-spotlight-pro/[LOCALE] directory.

For example, to edit the page heading create lang/vendor/filament-spotlight-pro/[LOCALE]/page.php, and set the heading key.

See the Laravel Docs on how work with translation strings. Refer to vendor/pxlrbt/filament-spotlight-pro/lang/en/ for all available files and translation keys.

Overriding Views

You can override the views by publishing the package views to your resources folder. For example you can customize the empty state by overriding/copying empty.blade.php to resources/views/vendor/filament-spotlight-pro/empty.blade.php.

Resource Groups

By default, resources use their getNavigationGroup() value for grouping in Spotlight. You can customize this behavior by implementing a getSpotlightGroup() method in your resource:

php
class UserResource extends Resource
{
    protected static ?string $navigationGroup = 'Administration';

    public static function getSpotlightGroup(): ?string
    {
        return 'People';
    }
}

If getSpotlightGroup() is not defined, or it returns null, the getNavigationGroup() value will be used.

Searching in Resource Groups

By default, Filament Spotlight Pro will only search the label of the results. You can enable searching for resource groups by using the searchGroups() method when registering the plugin.

php
use pxlrbt\FilamentSpotlightPro\SpotlightPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            SpotlightPlugin::make()
                ->searchGroups()
        ]);
}