Custom error pages

develop
Nathan Steel 9 months ago
parent 2d254dba30
commit 202b4af07f

@ -10,9 +10,9 @@
| you set here will be called when a 404 error is encountered
|
*/
// app()->set404(function() {
// response()->page(ViewsPath("errors/404.html", false), 404);
// });
app()->set404(function() {
response()->page(ViewsPath("errors/404.html", false), 404);
});
/*
|--------------------------------------------------------------------------
@ -24,9 +24,9 @@
| you set here will be called when a 500 error is encountered
|
*/
// app()->setErrorHandler(function() {
// response()->page(ViewsPath("errors/500.html", false), 500);
// });
app()->setErrorHandler(function() {
response()->page(ViewsPath("errors/500.html", false), 500);
});
/*
|--------------------------------------------------------------------------

@ -3,30 +3,18 @@
<head>
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<style>
body {
display: flex !important;
align-items: center !important;
justify-content: center !important;
flex-direction: column !important;
height: 95vh !important;
}
</style>
<link rel="stylesheet" href="/assets/aSkelly/css/main.css">
</head>
<body>
<h2>Error 4<span role="img" aria-label="O">&#x1f635;</span>4</h2>
<p>
<body class="body--error">
<section class="row row--justify-center">
<div class="col col-8 tac">
<h1 class="error-title">Error 404</h1>
<p class="error-text">
We could not find the page you requested, please check and try again
or <a href="/">Go Back Home</a>
</p>
</div>
</section>
</body>
</html>

@ -3,30 +3,16 @@
<head>
<title>Internal Server Error</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<style>
body {
display: flex !important;
align-items: center !important;
justify-content: center !important;
flex-direction: column !important;
height: 95vh !important;
}
</style>
<link rel="stylesheet" href="/assets/aSkelly/css/main.css">
</head>
<body>
<h2>
Error 5<span role="img" aria-label="O">&#x1f635;</span
><span role="img" aria-label="O">&#x1f635;</span>
</h2>
<p>Internal Server Error. Please try again later.</p>
<body class="body--error">
<section class="row row--justify-center">
<div class="col col-8 tac">
<h1 class="error-title">Error 500</h1>
<p class="error-text">Internal Server Error. Please try again later.</p>
<p class="error-text"><a href="/">Go Back Home</a></p>
</div>
</section>
</body>
</html>

Loading…
Cancel
Save