Skip to content

Instantly share code, notes, and snippets.

@martinbean
Last active March 1, 2018 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinbean/d808156b7ab7875f7866573e57b13508 to your computer and use it in GitHub Desktop.
Save martinbean/d808156b7ab7875f7866573e57b13508 to your computer and use it in GitHub Desktop.
Disable Bugsnag in certain environments
<?php
namespace App\Providers;
use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
Bugsnag::registerCallback(function($report) {
if ($this->app->environment('local', 'testing')) {
return false;
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment