added 3 error pages with common layout base
This commit is contained in:
parent
c386f84434
commit
f06ce731bf
6 changed files with 80 additions and 84 deletions
app/Http/Controllers
resources/views
routes
|
@ -12,4 +12,19 @@ class PageController extends Controller
|
|||
{
|
||||
return view('welcome');
|
||||
}
|
||||
|
||||
public function error403()
|
||||
{
|
||||
return view('errors.403');
|
||||
}
|
||||
|
||||
public function error404()
|
||||
{
|
||||
return view("errors.404");
|
||||
}
|
||||
|
||||
public function error503()
|
||||
{
|
||||
return view("errors.503");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,47 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Be right back.</title>
|
||||
@extends("layouts.error")
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
<div class="title">403 - Not Authorized</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@endsection
|
||||
|
|
9
resources/views/errors/404.blade.php
Normal file
9
resources/views/errors/404.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
@extends("layouts.error")
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">404 - Not Found</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,47 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Be right back.</title>
|
||||
@extends("layouts.error")
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
<div class="title">Be Right Back.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@endsection
|
45
resources/views/layouts/error.blade.php
Normal file
45
resources/views/layouts/error.blade.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Be right back.</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@yield("content")
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -12,6 +12,9 @@
|
|||
*/
|
||||
|
||||
Route::get('/', 'PageController@welcome');
|
||||
Route::get('/403', 'PageController@error403');
|
||||
Route::get('/404', 'PageController@error404');
|
||||
Route::get('/503', 'PageController@error503');
|
||||
|
||||
Auth::routes();
|
||||
|
||||
|
|
Reference in a new issue