Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvalue authored Jan 3, 2024
1 parent 1a8278e commit 1c9d8d7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ 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](https://filamentphp.com/docs/2.x/admin/resources/global-search)

#### Excluding pages

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:

```php
public static function shouldRegisterSpotlight(): bool
{
return false;
}
```

This can be useful when you have pages that require URL parameters.

## Translation

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

0 comments on commit 1c9d8d7

Please sign in to comment.