Package Data | |
---|---|
Maintainer Username: | pxlrbt |
Maintainer Contact: | info@pixelarbeit.de (Dennis Koch) |
Package Create Date: | 2022-03-23 |
Package Last Update: | 2025-01-23 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-27 15:00:02 |
Package Statistics | |
---|---|
Total Downloads: | 212,718 |
Monthly Downloads: | 12,761 |
Daily Downloads: | 542 |
Total Stars: | 252 |
Total Watchers: | 4 |
Total Forks: | 35 |
Total Open Issues: | 0 |
Quickly navigate your Filament Resources with Spotlight functionality.
Supports pages, resources and links from the user menu.
https://user-images.githubusercontent.com/22632550/159757479-ca9c3f46-7638-4889-98ba-6164e5205509.mp4
| Plugin Version | Filament Version | PHP Version | |----------------|-----------------|-------------| | 0.x | 2.x | > 8.0 | | 1.x | 3.x | > 8.1 |
composer require pxlrbt/filament-spotlight
Publish the assets (Filament > 3)
php artisan filament:assets
To use this plugin register it in your panel configuration:
use pxlrbt\FilamentSpotlight\SpotlightPlugin;
$panel
->plugins([
SpotlightPlugin::make(),
]);
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 + /
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
If you need to exclude a page from the spotlight results you may do so by adding a static shouldRegisterSpotlight
method to the page and return false:
public static function shouldRegisterSpotlight(): bool
{
return false;
}
This can be useful when you have pages that require URL parameters.
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
If you want to contribute to this packages, you may want to test it in a real Filament project:
/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
.