Laravel 4.x

Install the sentry/sentry-laravel package:

Copied
$ composer require sentry/sentry-laravel

Add the Sentry service provider and facade in config/app.php:

config/app.php
Copied
'providers' => array(
    // ...
    'Sentry\SentryLaravel\SentryLaravelServiceProvider',
),
'aliases' => array(
    // ...
    'Sentry' => 'Sentry\SentryLaravel\SentryFacade',
)

Create the Sentry configuration file (config/sentry.php):

Copied
$ php artisan config:publish sentry/sentry-laravel

Add your DSN to config/sentry.php:

config/sentry.php
Copied
<?php

return array(
    'dsn' => 'https://examplePublicKey@o0.ingest.sentry.io/0',

    // ...
);

If you wish to wire up Sentry anywhere outside of the standard error handlers, or if you need to configure additional settings, you can access the Sentry instance through $app:

Copied
$app['sentry']->setRelease(Git::sha());
You can edit this page on GitHub.