TheoKouzelis / laravel-airbrake

Laravel service provider for Airbrake https://github.com/airbrake/phpbrake
MIT License
25 stars 24 forks source link

Update docs to reflect the new handler syntax #19

Closed TheoKouzelis closed 2 years ago

TheoKouzelis commented 2 years ago
if ($this->shouldReport($throwable)) {
            $airbrakeNotifier = App::make('Airbrake\Notifier');
            $airbrakeNotifier->notify($throwable);
}
kevin-r-j commented 2 years ago

Can I suggest that you also add an alternative condition to remind people they may not want this to fire on all environments

    if ((env('APP_ENV') === 'production' || env('APP_ENV') === 'staging') && $this->shouldReport($throwable)) {
        $airbrakeNotifier = App::make('Airbrake\Notifier');
        $airbrakeNotifier->notify($throwable);
    }
TheoKouzelis commented 2 years ago

Now in the docs https://github.com/TheoKouzelis/laravel-airbrake/commit/02bdf9e7ef35959f7ec7974c7e3cd14eb10ed5c4