2017 © Pedro Peláez
 

library afterbug-laravel

AfterBug error monitoring for Laravel applications.

image

afterbug/afterbug-laravel

AfterBug error monitoring for Laravel applications.

  • Tuesday, May 15, 2018
  • by alfa6661
  • Repository
  • 1 Watchers
  • 2 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AfterBug for Laravel

StyleCI Total Downloads Latest Stable Version Latest Unstable Version License, (*1)

This library detects errors and exceptions in your Laravel application and reports them to AfterBug for alerts and reporting., (*2)

Features

  • Automatically report exceptions and errors
  • Send customized diagnostic data
  • Attach user information to determine how many people are affected by the error.

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

composer require afterbug/afterbug-laravel "~1.0"

or Add afterbug/afterbug-laravel to your composer.json, (*5)

"afterbug/afterbug-laravel": "~1.0"

Usage

If you're on Laravel 5.4 or earlier, you need to register the ServiceProvider in config/app.php, (*6)

'providers' => [
    // ...
    AfterBug\AfterBugLaravel\AfterBugServiceProvider::class,
],

Publish the default configuration, (*7)

php artisan vendor:publish --provider='AfterBug\AfterBugLaravel\AfterBugServiceProvider'

Add AfterBug reporting to app/Exceptions/Handler.php:, (*8)

public function report(Exception $e)
{
    if ($this->shouldReport($e)) {
        AfterBug::catchException($e);
    }

    return parent::report($e);
}

Callbacks

Set a callback to customize the data., (*9)

AfterBug::registerCallback(function ($config) {
    $config->setMetaData([
        'custom' => 'Your custom data', 
    ]);
})->catchException($e);

Sentinel

If you are using sentinel instead of laravel Auth, you have to setup user callback manually., (*10)

AfterBug::registerCallback(function ($config) {
    if (Sentinel::check()) {
        $config->setUser(
            Sentinel::getUser()->toArray()
        );
    }
})->catchException($e);

Add your AfterBug Api Key to .env:

AFTERBUG_API_KEY=Your_API_Key

The Versions

15/05 2018

dev-master

9999999-dev

AfterBug error monitoring for Laravel applications.

  Sources   Download

MIT

The Requires

 

10/05 2018

1.0.0

1.0.0.0

AfterBug error monitoring for Laravel applications.

  Sources   Download

MIT

The Requires