Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed Jul 22, 2019
0 parents commit 00c9b9e
Show file tree
Hide file tree
Showing 20 changed files with 1,149 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,3 @@
# Laravel Collective Package Contribution Guide

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.
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Matt Lantz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) <Matt Lantz>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
9 changes: 9 additions & 0 deletions readme.md
@@ -0,0 +1,9 @@
# Errors

[![Build Status](https://travis-ci.org/LaravelCollective/errors.svg)](https://travis-ci.org/LaravelCollective/errors)
[![Total Downloads](https://poser.pugx.org/LaravelCollective/errors/downloads)](https://packagist.org/packages/laravelcollective/errors)
[![Latest Stable Version](https://poser.pugx.org/LaravelCollective/errors/v/stable.svg)](https://packagist.org/packages/laravelcollective/errors)
[![Latest Unstable Version](https://poser.pugx.org/LaravelCollective/errors/v/unstable.svg)](https://packagist.org/packages/laravelcollective/errors)
[![License](https://poser.pugx.org/LaravelCollective/errors/license.svg)](https://packagist.org/packages/laravelcollective/errors)

Official documentation for Errors for The Laravel Framework can be found at the [LaravelCollective](http://laravelcollective.com) website.
28 changes: 28 additions & 0 deletions src/ErrorsServiceProvider.php
@@ -0,0 +1,28 @@
<?php

namespace Collective\Errors;

use Illuminate\Support\ServiceProvider;

class ErrorsServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->publishes([
__DIR__.'/publish/errors' => base_path('views/errors'),
__DIR__.'/publish/svg' => base_path('public/svg'),
]);
}
}
11 changes: 11 additions & 0 deletions src/publish/errors/401.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '401')
@section('title', __('Unauthorized'))

@section('image')
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __('Sorry, you are not authorized to access this page.'))
11 changes: 11 additions & 0 deletions src/publish/errors/403.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '403')
@section('title', __('Forbidden'))

@section('image')
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __($exception->getMessage() ?: __('Sorry, you are forbidden from accessing this page.')))
11 changes: 11 additions & 0 deletions src/publish/errors/404.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '404')
@section('title', __('Page Not Found'))

@section('image')
<div style="background-image: url({{ asset('/svg/404.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __('Sorry, the page you are looking for could not be found.'))
11 changes: 11 additions & 0 deletions src/publish/errors/419.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '419')
@section('title', __('Page Expired'))

@section('image')
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __('Sorry, your session has expired. Please refresh and try again.'))
11 changes: 11 additions & 0 deletions src/publish/errors/429.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '429')
@section('title', __('Too Many Requests'))

@section('image')
<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __('Sorry, you are making too many requests to our servers.'))
11 changes: 11 additions & 0 deletions src/publish/errors/500.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '500')
@section('title', __('Server Error'))

@section('image')
<div style="background-image: url({{ asset('/svg/500.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __('Whoops, something went wrong on our servers.'))
11 changes: 11 additions & 0 deletions src/publish/errors/503.blade.php
@@ -0,0 +1,11 @@
@extends('errors::illustrated-layout')

@section('code', '503')
@section('title', __('Service Unavailable'))

@section('image')
<div style="background-image: url({{ asset('/svg/503.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center">
</div>
@endsection

@section('message', __($exception->getMessage() ?: __('Sorry, we are doing some maintenance. Please check back soon.')))

0 comments on commit 00c9b9e

Please sign in to comment.