remove config

This commit is contained in:
vedatakd 2021-07-28 15:11:34 +03:00
parent 8f15f20ab6
commit a33b5713fc
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),
];