PHP code example of bluemove / laravel-lumen-rollbar

1. Go to this page and download the library: Download bluemove/laravel-lumen-rollbar 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/ */

    

bluemove / laravel-lumen-rollbar example snippets


Jenssegers\Rollbar\RollbarServiceProvider::class,

if ($this->app->environment('production')) {
    $this->app->register(\Jenssegers\Rollbar\RollbarServiceProvider::class);
}

'rollbar' => [
    'access_token' => env('ROLLBAR_TOKEN'),
    'level' => env('ROLLBAR_LEVEL'),
],

public function report(Exception $e)
{
    \Log::error($e);
    return parent::report($e);
}

App::error(function(Exception $exception, $code)
{
    Log::error($exception);
});

\Log::debug('Here is some debug information');

\Log::error('Something went wrong', [
    'person' => ['id' => 123, 'username' => 'John Doe', 'email' => '[email protected]']
]);

\Log::warning('Something went wrong', [
    'download_size' => 3432425235
]);