Skip to content

Laravel 5 and Lumen package for Codebase Exceptions (https://www.codebasehq.com/) handler using Airbrake API

License

Notifications You must be signed in to change notification settings

virginmobile-cl/laravel-airbrake-codebase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel and Lumen Airbrake Codebase

This is a Laravel 5 and Lumen package for Codebase Exceptions handler using Airbrake PHP package.

This package will configure an instance of Airbrake\Notifier with an project ID and key from Codebase Exceptions handler.

Install

Require it via composer.

composer require matriphe/laravel-airbrake-codebase

Laravel

For Laravel version below 5.4, add package to list of service providers in config/app.php file. No need to add this manually in Laravel 5.5 since it used auto package discovery.

'providers' => [
    Matriphe\Codebase\CodebaseServiceProvider::class,
],

Publish and fill out the config/codebase.php file with your project ID, key, and ignored environments.

php artisan vendor:publish --provider="Matriphe\Codebase\CodebaseServiceProvider"

Lumen

Register package by adding this line in bootstrap/app.php.

$app->register(Matriphe\Codebase\CodebaseServiceProvider::class);

Manually copy the config file to your config path. If config path doesn't exists, make it first.

cp vendor/matriphe/laravel-airbrake-codebase/config/codebase.php config/

Ignoring Exceptions

To ignore some exceptions sent to Codebase Exceptions, just add the ignored exceptions in app/Exceptions/Handler.php in $dontReport section of your application.

class Handler extends ExceptionHandler
{
   /**
     * A list of the exception types that should not be reported.
     *
     * @var array
     */
    protected $dontReport = [
        HttpException::class,
        ModelNotFoundException::class,
        YourIgnoredException::class,
    ];

About

Laravel 5 and Lumen package for Codebase Exceptions (https://www.codebasehq.com/) handler using Airbrake API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%