Merge pull request #1126 from openclassify/vedat

remove config
This commit is contained in:
Muammer Top 2021-07-28 15:25:04 +03:00 committed by GitHub
commit e261e0265b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 15 deletions

View File

@ -72,13 +72,12 @@ class ExceptionHandler extends Handler
public function report(Throwable $e)
{
if (app()->bound('sentry')
&& $this->shouldReport($e)
&& env('SENTRY_LARAVEL_DSN')) {
if (config('app.enable_sentry_laravel')) {
if (app()->bound('sentry') &&
$this->shouldReport($e) &&
env('SENTRY_LARAVEL_DSN') &&
!empty(env('SENTRY_LARAVEL_DSN'))) {
app('sentry')->captureException($e);
}
}
if ($e instanceof Swift_TransportException) {
die(trans('visiosoft.theme.base::message.error_mail'));

View File

@ -269,7 +269,4 @@ return [
],
'enable_sentry_laravel' => env('ENABLE_SENTRY_LARAVEL',true),
];