diff --git a/README.md b/README.md index 5566514..256bf0c 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,13 @@ class CreateUser extends SpotlightCommand { return SpotlightCommandDependencies::collection() ->add(SpotlightCommandDependency::make('team')->setPlaceholder('For which team do you want to create a user?')) - ->add(SpotlightCommandDependency::make('name')->setPlaceholder('How do you want to name this user?')->setType(SpotlightCommandDependency::INPUT)); + ->add(SpotlightCommandDependency::make('foobar')->setPlaceholder('Search for second dependency') + ); + } + + public function searchFoobar($query, User $user) + { + // Given Foobar is the second dependency it will have access to any resolved depedencies defined earlier. In this case we can access the User which was chosen. } public function searchTeam($query) @@ -394,6 +400,12 @@ return [ ]; ``` +If you want to change the spotlight view, you can also publish the views. + +```shell +php artisan vendor:publish --tag=livewire-ui-spotlight-views +``` + ## Credits - [Philo Hermans](https://github.com/philoNL) diff --git a/config/livewire-ui-spotlight.php b/config/livewire-ui-spotlight.php index 592ee7e..9d2c5cc 100644 --- a/config/livewire-ui-spotlight.php +++ b/config/livewire-ui-spotlight.php @@ -50,8 +50,9 @@ |-------------------------------------------------------------------------- | | Spotlight will inject the required Javascript in your blade template. - | If you want to bundle the required Javascript you can set this to false - | run `npm install --save fuse.js` and add `require('vendor/livewire-ui/spotlight/resources/js/spotlight');` + | If you want to bundle the required Javascript you can set this to false, + | call 'npm install fuse.js' or 'yarn add fuse.js', + | then add `require('vendor/livewire-ui/spotlight/resources/js/spotlight');` | to your script bundler like webpack. | */ diff --git a/resources/views/spotlight.blade.php b/resources/views/spotlight.blade.php index eb5c387..8377cf4 100644 --- a/resources/views/spotlight.blade.php +++ b/resources/views/spotlight.blade.php @@ -17,14 +17,14 @@ @keydown.window.escape="isOpen = false" @toggle-spotlight.window="toggleOpen()" class="fixed z-50 px-4 pt-16 flex items-start justify-center inset-0 sm:pt-24"> -