#93 - custom error pages #94

Merged
EwelinaLasowy merged 11 commits from #93-custom-error-pages into main 2022-03-30 09:06:25 +02:00
Showing only changes of commit 9dba729b58 - Show all commits

View File

@@ -21,7 +21,7 @@ class ExceptionHandler extends Handler
{
$response = parent::render($request, $e);
if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 404, 403], true)) {
if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 419, 404, 403], true)) {
return Inertia::render("Error", [
"status" => $response->status(),
])
@@ -29,12 +29,6 @@ class ExceptionHandler extends Handler
->setStatusCode($response->status());
}
if ($response->status() === 419) {
return back()->with([
"message" => "The page expired, please try again.",
]);
}
return $response;
}
}