fixed flatten
This commit is contained in:
@@ -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) {
|
$this->reportable(function (Throwable $e) {
|
||||||
if ($this->shouldReport($e) === true) {
|
if ($this->shouldReport($e) === true) {
|
||||||
$this->sendEmail($e);
|
$this->sendEmail($e);
|
||||||
@@ -85,14 +73,14 @@ class Handler extends ExceptionHandler
|
|||||||
public function sendEmail(Throwable $exception)
|
public function sendEmail(Throwable $exception)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$e = FlattenException::create($exception);
|
$e = FlattenException::createFromThrowable($exception);
|
||||||
$handler = new HtmlErrorRenderer(true);
|
$handler = new HtmlErrorRenderer(true);
|
||||||
$css = $handler->getStylesheet();
|
$css = $handler->getStylesheet();
|
||||||
$content = $handler->getBody($e);
|
$content = $handler->getBody($e);
|
||||||
|
|
||||||
Mail::send('emails.exception', compact('css', 'content'), function ($message) {
|
Mail::send('emails.exception', compact('css', 'content'), function ($message) {
|
||||||
$message
|
$message
|
||||||
->to('youremailhere@gmail.com')
|
->to('webmaster@stemmechanics.com.au')
|
||||||
->subject('Exception Generated')
|
->subject('Exception Generated')
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user