PHP code example of sl0wik / laravel-scout-elasticsearch-driver

1. Go to this page and download the library: Download sl0wik/laravel-scout-elasticsearch-driver library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sl0wik / laravel-scout-elasticsearch-driver example snippets


// config/app.php
'providers' => [
    ...
    Laravel\Scout\ScoutServiceProvider::class,
    ...
    ScoutEngines\Elasticsearch\ElasticsearchProvider::class,
],

    'driver' => env('SCOUT_DRIVER', 'elasticsearch'),
...
    'elasticsearch' => [
        'hosts' => [
            env('ELASTICSEARCH_HOST', 'http://localhost'),
        ],
    ],
...