Skip to content

Commit 00c9b9e

Browse files
committed
Initial commit
0 parents  commit 00c9b9e

20 files changed

+1149
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Laravel Collective Package Contribution Guide
2+
3+
Thank you for considering contributing to a Laravel Collective Package! The follow the Laravel contribution guide which can be found in the [Laravel documentation](http://laravel.com/docs/contributions). Please review the entire guide before sending a pull request.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Matt Lantz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) <Matt Lantz>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Errors
2+
3+
[![Build Status](https://travis-ci.org/LaravelCollective/errors.svg)](https://travis-ci.org/LaravelCollective/errors)
4+
[![Total Downloads](https://poser.pugx.org/LaravelCollective/errors/downloads)](https://packagist.org/packages/laravelcollective/errors)
5+
[![Latest Stable Version](https://poser.pugx.org/LaravelCollective/errors/v/stable.svg)](https://packagist.org/packages/laravelcollective/errors)
6+
[![Latest Unstable Version](https://poser.pugx.org/LaravelCollective/errors/v/unstable.svg)](https://packagist.org/packages/laravelcollective/errors)
7+
[![License](https://poser.pugx.org/LaravelCollective/errors/license.svg)](https://packagist.org/packages/laravelcollective/errors)
8+
9+
Official documentation for Errors for The Laravel Framework can be found at the [LaravelCollective](http://laravelcollective.com) website.

src/ErrorsServiceProvider.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace Collective\Errors;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class ErrorsServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Indicates if loading of the provider is deferred.
11+
*
12+
* @var bool
13+
*/
14+
protected $defer = true;
15+
16+
/**
17+
* Register the service provider.
18+
*
19+
* @return void
20+
*/
21+
public function register()
22+
{
23+
$this->publishes([
24+
__DIR__.'/publish/errors' => base_path('views/errors'),
25+
__DIR__.'/publish/svg' => base_path('public/svg'),
26+
]);
27+
}
28+
}

src/publish/errors/401.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '401')
4+
@section('title', __('Unauthorized'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __('Sorry, you are not authorized to access this page.'))

src/publish/errors/403.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '403')
4+
@section('title', __('Forbidden'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __($exception->getMessage() ?: __('Sorry, you are forbidden from accessing this page.')))

src/publish/errors/404.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '404')
4+
@section('title', __('Page Not Found'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/404.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __('Sorry, the page you are looking for could not be found.'))

src/publish/errors/419.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '419')
4+
@section('title', __('Page Expired'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __('Sorry, your session has expired. Please refresh and try again.'))

src/publish/errors/429.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '429')
4+
@section('title', __('Too Many Requests'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __('Sorry, you are making too many requests to our servers.'))

src/publish/errors/500.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '500')
4+
@section('title', __('Server Error'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/500.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __('Whoops, something went wrong on our servers.'))

src/publish/errors/503.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@extends('errors::illustrated-layout')
2+
3+
@section('code', '503')
4+
@section('title', __('Service Unavailable'))
5+
6+
@section('image')
7+
<div style="background-image: url({{ asset('/svg/503.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
8+
</div>
9+
@endsection
10+
11+
@section('message', __($exception->getMessage() ?: __('Sorry, we are doing some maintenance. Please check back soon.')))

0 commit comments

Comments
 (0)