From 371724876404752f1506a4152b0c8bb685db05f3 Mon Sep 17 00:00:00 2001 From: James Collins Date: Thu, 27 Jul 2023 21:55:35 +1000 Subject: [PATCH] fixed flatten --- app/Exceptions/Handler.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 7d5c9bb..8e75255 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -62,18 +62,6 @@ class Handler extends ExceptionHandler } }); - $this->renderable( - function (Throwable $exception, $request) { - if ($exception instanceof \Illuminate\Session\TokenMismatchException) { - return redirect() - ->back() - ->withInput($request->except('password')) - ->with('errorMessage', 'This form has expired due to inactivity. Please try again.'); - } - } - ); - - $this->reportable(function (Throwable $e) { if ($this->shouldReport($e) === true) { $this->sendEmail($e); @@ -85,14 +73,14 @@ class Handler extends ExceptionHandler public function sendEmail(Throwable $exception) { try { - $e = FlattenException::create($exception); + $e = FlattenException::createFromThrowable($exception); $handler = new HtmlErrorRenderer(true); $css = $handler->getStylesheet(); $content = $handler->getBody($e); Mail::send('emails.exception', compact('css', 'content'), function ($message) { $message - ->to('youremailhere@gmail.com') + ->to('webmaster@stemmechanics.com.au') ->subject('Exception Generated') ; });