Commit e91395a5 authored by Micheal Mand's avatar Micheal Mand Committed by Nicolas Widart

Fix TokenMismatchException not being handled if `app.debug` is `false` (#358)

Signed-off-by: 's avatarMicheal Mand <micheal@kmdwebdesigns.com>
parent 8cf4ec98
......@@ -54,14 +54,14 @@ class Handler extends ExceptionHandler
return parent::render($request, $e);
}
if (config('app.debug') === false) {
return $this->handleExceptions($e);
}
if ($e instanceof TokenMismatchException) {
return redirect()->back()
->withInput($request->except('password'))
->withErrors(trans('core::core.error token mismatch'));
->withInput($request->except('password'))
->withErrors(trans('core::core.error token mismatch'));
}
if (config('app.debug') === false) {
return $this->handleExceptions($e);
}
return parent::render($request, $e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment