Install the algolia/scout package
First, install Scout and Algolia’s API client via composer
composer require laravel/scout composer require algolia/algoliasearch-client-php
If you use Laravel 5.5, the package will be discovered automatically.
If you use a version <5.5, the service provider should be added to the
providers array in the
Finally, you will need to publish the configuration file. This command will create a
scout.php configuration file in your config directory.
<?php php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
Configure API Keys
You can set the keys directly inside the
scout.php file that we just published but we recommend rather that you set the credentials (APP_ID and API Key) inside the
.env file by adding the following content:
Did you find this page helpful?
We're always looking for advice to help improve our documentation!
Please let us know what's working (or what's not!).
We're constantly iterating thanks to the feedback we receive.