Skip to content

Commit 694f499

Browse files
authored
Merge pull request #47 from Laravel-Backpack/error-pages
Added error pages
2 parents 74b7487 + f971c57 commit 694f499

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"Laravel", "Backpack", "Backpack for Laravel", "Backpack Addon", "ThemeCoreuiv4"
2525
],
2626
"require": {
27-
"backpack/crud": "^6.2"
27+
"backpack/crud": "^6.2.1"
2828
},
2929
"require-dev": {
3030
"phpunit/phpunit": "~9.0",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>{{ trans('backpack::base.error_page.title', ['error' => $error_number]) }}</title>
7+
8+
@include(backpack_view('inc.theme_styles'))
9+
@include(backpack_view('inc.styles'))
10+
</head>
11+
<body>
12+
@yield('content')
13+
</body>
14+
</html>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@extends(backpack_view(backpack_user() && backpack_theme_config('layout') ? 'layouts.'.backpack_theme_config('layout') : 'errors.blank'))
2+
3+
@section('content')
4+
<div class="d-flex align-items-center" style="height: calc(100vh - 7rem)">
5+
<div class="container">
6+
<div class="col-md-6 m-auto">
7+
<div class="d-flex justify-content-center">
8+
<h1 class="display-2 mb-0 me-4">{{ $error_number }}</h1>
9+
<div>
10+
<h4 class="pt-3">@yield('title')</h4>
11+
<p class="text-medium-emphasis">@yield('description')</p>
12+
<div class="empty-action">
13+
<a href="./." class="btn btn-primary">
14+
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 12l14 0"></path><path d="M5 12l6 6"></path><path d="M5 12l6 -6"></path></svg>
15+
{{ trans('backpack::base.error_page.button') }}
16+
</a>
17+
</div>
18+
</div>
19+
</div>
20+
</div>
21+
</div>
22+
</div>
23+
@endsection

0 commit comments

Comments
 (0)