PHP code example of ivampiresp / laravel-elasticsearch-logger

1. Go to this page and download the library: Download ivampiresp/laravel-elasticsearch-logger 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/ */

    

ivampiresp / laravel-elasticsearch-logger example snippets


'elastic' => [
    'driver' => 'custom',
    'via' => \ivampiresp\LaravelElasticsearchLogger\ESLogger::class,
    'verify_ssl' => false,
    'hosts' => [env('ELASTIC_HOST', 'https://localhost:9200')],
    'user' => env('ELASTIC_USER', 'elastic'),
    'pass' => env('ELASTIC_PASS', ''),
    'index' => Str::slug(env('APP_NAME', 'laravel'), '_').'-logs'
]