diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index 355fdcc..85fa910 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -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"); + } } diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index eb76d26..f95d795 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -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 diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php new file mode 100644 index 0000000..c25fa56 --- /dev/null +++ b/resources/views/errors/404.blade.php @@ -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 \ No newline at end of file diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index eb76d26..35443b1 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -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 \ No newline at end of file diff --git a/resources/views/layouts/error.blade.php b/resources/views/layouts/error.blade.php new file mode 100644 index 0000000..a83df1b --- /dev/null +++ b/resources/views/layouts/error.blade.php @@ -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> \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index c8190af..f827118 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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();