This script command provides a quick way of searching the Laravel documentation.
It accepts a query and will open the first result in your default browser.
-
Begin by creating a
~/.config/raycast/scripts
folder if you don't already have one. -
Add the
laravel.js
andpackage.json
file to this folder.
If you already have a
package.json
in this folder, runnpm install open algoliasearch -D
instead.
- Add the
~/.config/raycast/scripts
folder to Raycast
Open Raycast and search for
Extensions
. Hit Cmd + N and choose "Add Script Directory". Navigate to and choose the~/.config/raycast/scripts
folder.
-
Open Raycast and type
laravel
. It should appear as a Script Command. -
Hit Enter and you'll be prompted to enter your search query. Type your search and hit enter. The Raycast output window will tell you how many results were found and it'll open the most relevant in your default browser.
For @weavdale and anyone else that might stumble across this.
To make sure you always have the latest search results from the Laravel docs, I've used the Algolia keys from the documentation site. This way you'll have access to everything from 4.2 to current the current master branch (as long as you've set that version inside the
facetFilters
key of thelaravel.js
file and provided Laravel don't ever change the keys).Make a simple change to
laravel.js
on line 20and on line 24