For more information, read the Scout Extended changelog.
-
Install Scout Extended with Composer:
Command line
-
Publish the Scout configuration to your
configdirectory:Command line -
For the model you would like to make searchable,
add the
Searchabletrait. For example, for anArticlemodel (app/Models/Article.php):PHPReplaceArticlewith a model used in your app. -
While not required, you should use a queue driver for Scout operations.
After configuring a queue driver, set
queuetotruein yourconfig/scout.phpfile:PHP -
To access Algolia, copy your credentials from the Algolia dashboard to your
.envfile:.env -
To import existing data:
- If you’re importing from your Laravel database for the first time, use
scout:import. - If you’ve installed Scout Extended in a Laravel Scout project, use
scout:reimport.
If you make significant changes to your Scout configuration or need to reindex all your data, usescout:reimportto ensure everything is in sync. - If you’re importing from your Laravel database for the first time, use
-
Open the
routes/web.phpfile and add the following route to the bottom of the file:PHPReplaceArticlewith a model used in your app.