dev-master
9999999-devAfterBug error monitoring for Laravel applications.
MIT
The Requires
by Alfa Adhitya
Wallogit.com
2017 © Pedro Peláez
AfterBug error monitoring for Laravel applications.
This library detects errors and exceptions in your Laravel application and reports them to AfterBug for alerts and reporting., (*2)
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"
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);
}
Set a callback to customize the data., (*9)
AfterBug::registerCallback(function ($config) {
$config->setMetaData([
'custom' => 'Your custom data',
]);
})->catchException($e);
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);
AFTERBUG_API_KEY=Your_API_Key
AfterBug error monitoring for Laravel applications.
MIT