A Laravel wrapper for Bugsnag Laravel.
We love Bugsnag. It's pretty much our most used tool in Nodes.
Therefore we decided to make a Laravel wrapper for the service and even managed to squeeze in an additional feature or two.
To install this package you will need:
- Laravel 5.1+
- PHP 5.5.9+
You must then modify your composer.json
file and run composer update
to include the latest version of the package in your project.
"require": {
"nodes/bugsnag": "^2.0"
}
Or you can run the composer require command from your terminal.
composer require nodes/bugsnag:^2.0
Setup service provider in config/app.php
Nodes\ServiceProvider::class,
Nodes\Bugsnag\ServiceProvider::class,
Publish config files
php artisan vendor:publish --provider="Nodes\Bugsnag\ServiceProvider"
If you want to overwrite any existing config files use the --force
parameter
php artisan vendor:publish --provider="Nodes\Bugsnag\ServiceProvider" --force
After you have added the service provider to the config/app.php
array, then it pretty much works automatically.
Only thing you need make sure, is that you've entered the correct API_KEY
in the config/nodes/bugsnag.php
config file.
It happens once in a while, that you might need to try {} catch {}
stuff and when you're catching exception you wish to surpress it for the user,
but you would actually also like to be notified about it in Bugsnag. Then you can use the global helper method bugsnag_report
to that.
function bugsnag_report(\Exception $exception, $meta = [], $severity = null)
This package is developed and maintained by the PHP team at Nodes Agency
This package is open-sourced software licensed under the MIT license