PHPackages                             enniosousa/server-error-pages - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. enniosousa/server-error-pages

ActivePackage[Utility &amp; Helpers](/categories/utility)

enniosousa/server-error-pages
=============================

Laravel server-side error pages

v1.1.0(4y ago)175.6k6[1 issues](https://github.com/enniosousa/server-error-pages/issues)MITPHP

Since Feb 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/enniosousa/server-error-pages)[ Packagist](https://packagist.org/packages/enniosousa/server-error-pages)[ RSS](/packages/enniosousa-server-error-pages/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

Laravel Server Error Pages
==========================

[](#laravel-server-error-pages)

[![Latest Stable Version](https://camo.githubusercontent.com/386232b2ca3ffcb24e279fa7721356064858557a845b4b6daa69473893373392/68747470733a2f2f706f7365722e707567782e6f72672f656e6e696f736f7573612f7365727665722d6572726f722d70616765732f762f737461626c65)](https://packagist.org/packages/enniosousa/server-error-pages)[![Total Downloads](https://camo.githubusercontent.com/a54080d3d5023c4b217579d5d8d9541db1ad0d4de3471dd7be8c3a4cc3406e4c/68747470733a2f2f706f7365722e707567782e6f72672f656e6e696f736f7573612f7365727665722d6572726f722d70616765732f646f776e6c6f616473)](https://packagist.org/packages/enniosousa/server-error-pages)[![License](https://camo.githubusercontent.com/419d3dc11b14b2889a41047f8d01c9bc93199977e8202cd2c7cfc4101ab21be4/68747470733a2f2f706f7365722e707567782e6f72672f656e6e696f736f7573612f7365727665722d6572726f722d70616765732f6c6963656e7365)](https://packagist.org/packages/enniosousa/server-error-pages)

### Table of Contents

[](#table-of-contents)

- [Errors Avaliables](#errors-avaliables)
- [Languages Avaliables](#languages-avaliables)
- [Installation](#installation)
- [How to Create Custom Error Pages](#how-to-create-custom-error-pages)
- [Custom Error Messages](#custom-error-messages)

Errors Avaliables
-----------------

[](#errors-avaliables)

- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 405 Method not allowed
- 419 Authentication Timeout
- 429 Too Many Requests
- 500 Internal Server Error
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- Maintenance (used when `php artisan down`)

### Languages Avaliables

[](#languages-avaliables)

- English by [alexphelps/server-error-pages](https://github.com/alexphelps/server-error-pages)
- Brazilian Portuguese by [Ennio Sousa](https://enniosousa.com.br)
- Spanish by [Patricia Carmona](https://github.com/carmonapacs)

Installation
------------

[](#installation)

**Step 1**:Install package via Composer

```
composer require enniosousa/server-error-pages
```

**Step 2**: If you are using Laravel 5, include the service provider within your `config/app.php` file.

```
'providers' => [
    EnnioSousa\ServerErrorPages\ServerErrorPagesServiceProvider::class,
];
```

**Step 3**: Publish vendor provider

```
php artisan vendor:publish --provider="EnnioSousa\ServerErrorPages\ServerErrorPagesServiceProvider"
```

How to Create Custom Error Pages
--------------------------------

[](#how-to-create-custom-error-pages)

**Step 1**: Create new empty file named with HTTP code error at folder `resources/views/errors` like specified in [Laravel docs](https://laravel.com/docs/5.5/errors#custom-http-error-pages).

**Step 2**: Put the following content in the file you just created.

```
@include('server-error-pages::template', compact($exception))

```

**Step 3**: Add to file `resrouces/lang/vendor/en/server-error-pages.php` custom messages following the template:

```
