PhpDev.App
pxlrbt/filament-spotlight

pxlrbt/filament-spotlight

Stars: 148

Forks: 8

Pull Requests: 16

Issues: 15

Watchers: 3

Last Updated: 2023-09-11 10:38:29

Quickly navigate your Filament pages

License: MIT License

Languages: PHP, JavaScript, CSS

header

Filament Spotlight

Latest Version on Packagist Software License GitHub Workflow Status Total Downloads

Quickly navigate your Filament Resources with Spotlight functionality.

Supports pages, resources and links from the user menu.

demo.mp4

Installation

Plugin Version Filament Version PHP Version
0.x 2.x > 8.0
1.x 3.x > 8.1
composer require pxlrbt/filament-spotlight

Assets

Publish the assets (Filament > 3)

php artisan filament:assets

Plugin registration

To use this plugin register it in your panel configuration:

use pxlrbt\FilamentSpotlight\SpotlightPlugin;

$panel
    ->plugins([
        SpotlightPlugin::make(),
    ]);

Usage

There is no configuration needed.

"its genius"

  – Dan Harrin

To open the Spotlight input bar you can use one of the following shortcuts:

CTRL + K
CMD + K
CTRL + /
CMD + /

Setup

This plugin relies on the same properties and methods used for Filament's global search. For records showing up with the correct name in "Edit/View" you need to set $recordTitleAttribute. Check the docs for more information

Translation

To translate or edit the default placeholder, you have to publish the translation file for wire-element/spotlight:

php artisan vendor:publish --tag=livewire-ui-spotlight-translations

Contributing

If you want to contribute to this packages, you may want to test it in a real Filament project:

  • Fork this repository to your GitHub account.
  • Create a Filament app locally.
  • Clone your fork in your Filament app's root directory.
  • In the /filament-spotlight directory, create a branch for your fix, e.g. fix/error-message.

Install the packages in your app's composer.json:

"require": {
    "pxlrbt/filament-spotlight": "dev-fix/error-message as main-dev",
},
"repositories": [
    {
        "type": "path",
        "url": "filament-spotlight"
    }
]

Now, run composer update.

Credits