Installing Airbrake in a Laravel application


Laravel-airbrake is the community created Laravel service provider for the official Airbrake PHP package.


Require via composer:

composer require kouz/laravel-airbrake

For Laravel >=5.5 the package will be discoverd. For Laravel <=5.4 add package to list of service providers in config/app.php:



    'providers' => [

Publish and fill out the config/airbrake.php file with your projectId and projectKey:

php artisan vendor:publish --provider="Kouz\LaravelAirbrake\ServiceProvider"


The variables projectId and projectKey are required. Leave the rest empty to use Airbrake’s default values.

  'projectId'     => '',
  'projectKey'    => '',
  'environment'   => env('APP_ENV', 'production'),

  //leave the following options empty to use defaults

  'appVersion'    => '',
  'host'          => '',
  'rootDirectory' => '',
  'httpClient'    => '',

For more info, please check out the official GitHub repo for laravel-airbrake.