diff --git a/src/Utils/Journal.php b/src/Utils/Journal.php index 5476f2f..ad6c262 100644 --- a/src/Utils/Journal.php +++ b/src/Utils/Journal.php @@ -42,8 +42,12 @@ public static function error(string $message, array $data = []): self /** * Handle exception, log as error and send notification to database. */ - public static function handler(\Throwable $e): self + public static function handler(\Throwable $e): ?self { + if (config('app.env') === 'local') { + return null; + } + return new self($e->getMessage(), 'error', [ 'file' => $e->getFile(), 'line' => $e->getLine(),