finishes 13 and 14

This commit is contained in:
2026-02-03 20:18:08 +01:00
parent c693cde038
commit baa43de4e1
47 changed files with 3522 additions and 21 deletions

View File

@@ -22,5 +22,19 @@
]);
})
->withExceptions(function (Exceptions $exceptions): void {
//
$exceptions->respond(function (\Symfony\Component\HttpFoundation\Response $response, \Throwable $exception, \Illuminate\Http\Request $request) {
if (! app()->environment('local') && in_array($response->getStatusCode(), [403, 404, 500, 503])) {
return \Inertia\Inertia::render('ErrorPage', ['status' => $response->getStatusCode()])
->toResponse($request)
->setStatusCode($response->getStatusCode());
}
if ($response->getStatusCode() === 419) {
return back()->with([
'message' => 'The page expired, please try again.',
]);
}
return $response;
});
})->create();