Skip to content

Commit

Permalink
docs(laravel): error views
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaiyuxin103 committed Jan 18, 2025
1 parent 06c8b97 commit d45fa65
Show file tree
Hide file tree
Showing 10 changed files with 609 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/views/errors/401.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Unauthorized'))
@section('code', '401')
@section('message', __('Unauthorized'))
5 changes: 5 additions & 0 deletions resources/views/errors/402.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Payment Required'))
@section('code', '402')
@section('message', __('Payment Required'))
5 changes: 5 additions & 0 deletions resources/views/errors/403.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Forbidden'))
@section('code', '403')
@section('message', __($exception->getMessage() ?: 'Forbidden'))
5 changes: 5 additions & 0 deletions resources/views/errors/404.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Not Found'))
@section('code', '404')
@section('message', __('Not Found'))
5 changes: 5 additions & 0 deletions resources/views/errors/419.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Page Expired'))
@section('code', '419')
@section('message', __('Page Expired'))
5 changes: 5 additions & 0 deletions resources/views/errors/429.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Too Many Requests'))
@section('code', '429')
@section('message', __('Too Many Requests'))
5 changes: 5 additions & 0 deletions resources/views/errors/500.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Server Error'))
@section('code', '500')
@section('message', __('Server Error'))
5 changes: 5 additions & 0 deletions resources/views/errors/503.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@extends('errors::minimal')

@section('title', __('Service Unavailable'))
@section('code', '503')
@section('message', __('Service Unavailable'))
68 changes: 68 additions & 0 deletions resources/views/errors/layout.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>@yield('title')</title>

<!-- Styles -->
<style>
html,
body {
background-color: #fff;
color: #636b6f;
font-family:
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
'Noto Sans',
sans-serif,
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji';
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.content {
text-align: center;
}
.title {
font-size: 36px;
padding: 20px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
<div class="content">
<div class="title">
@yield('message')
</div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit d45fa65

Please sign in to comment.