PHP code example of scoutapp / scout-apm-lumen

1. Go to this page and download the library: Download scoutapp/scout-apm-lumen 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/ */

    

scoutapp / scout-apm-lumen example snippets


// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
$app->register(\Scoutapm\Laravel\Providers\ScoutApmServiceProvider::class);

$app->middleware([
    // These three should be as early as possible in the pipeline:
    \Scoutapm\Laravel\Middleware\SendRequestToScout::class,
    \Scoutapm\Laravel\Middleware\IgnoredEndpoints::class,
    \Scoutapm\Laravel\Middleware\MiddlewareInstrument::class,
    
    // The rest of your middleware should go here
    // ...
    
    // This middleware should come last
    \Scoutapm\Laravel\Middleware\ActionInstrument::class,
]);

$app->withFacades();

SCOUT_LOG_LEVEL=error