PHPackages                             winternight/laravel-error-handler - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. winternight/laravel-error-handler

AbandonedArchivedLibrary[Debugging &amp; Profiling](/categories/debugging)

winternight/laravel-error-handler
=================================

Error handler package for the Laravel 5 framework

1.7(9y ago)1510.1k5MITPHPPHP &gt;=5.6.0

Since Jan 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/otherguy/laravel-error-handler)[ Packagist](https://packagist.org/packages/winternight/laravel-error-handler)[ Docs](https://github.com/darkwinternight/laravel-error-handler)[ RSS](/packages/winternight-laravel-error-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (10)Used By (0)

[![Maintained: no](https://camo.githubusercontent.com/ee5a79f1c0c7428841e879065ab240ec5057790f78f261876ef1c75af9820fe8/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f6e6f2f323031372e7376673f7374796c653d666c61742d737175617265)](http://unmaintained.tech/)[![Latest Stable Version](https://camo.githubusercontent.com/9c7108d0a82d6732d493d30562f06ccc59683732941225a2938f1d04e6481354/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77696e7465726e696768742f6c61726176656c2d6572726f722d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/winternight/laravel-error-handler) [![License](https://camo.githubusercontent.com/36cbc20c8ec745ecb8605aa04645cd1bd38728fd88ca80fb98288b587f7d64ca/68747470733a2f2f696d672e736869656c64732e696f2f6475622f6c2f766962652d642e7376673f7374796c653d666c61742d737175617265)](license.md) [![Downloads](https://camo.githubusercontent.com/ffc8a15c6d74f115daf11c8d3c592d5d38d43d9f0852b0115671b4f23c7361aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77696e7465726e696768742f6c61726176656c2d6572726f722d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/winternight/laravel-error-handler)

⚠️ No longer maintained
=======================

[](#️-no-longer-maintained)

Fortunately, [Laravel 5.5 has brought back the *Whoops* error handler](https://laravel-news.com/whoops-laravel-5-5) and this has continued throughout Laravel 5.6 and now 5.7.

This repository and package can still be used for Laravel 5.2 and 5.3 and will continue to work. I will not add Laravel 5.4 support because [Laravel 5.4 itself is no longer supported](https://laravel.com/docs/5.7/releases#support-policy).

Issue reports and pull requests on this repository will not be attended.

Laravel 5.2/5.3 Error Handler
=============================

[](#laravel-5253-error-handler)

Unlike version 4, Laravel 5 no longer uses [Whoops](https://github.com/filp/whoops "filp/whoops") error handling out of the box and instead relies on the Symfony error handler, which is far less informative for developers.

This packages provides a convenient way to get the more informative [Whoops](https://github.com/filp/whoops "filp/whoops")error messages back in your Laravel 5.2/5.3 project, along with a few other goodies.

[![Exception](screenshot.png "The Whoops Error Handler in Action!")](screenshot.png)

Features
--------

[](#features)

- Optional [Whoops](https://github.com/filp/whoops "filp/whoops") 1.1 or 2.1 exception handler in debug mode
- Standard (and configurable) error views in production mode
- Provides AJAX-compatible JSON error responses in case of an exception (including HTTP exceptions)
- Fires an event for each exception, providing full access to the exception
- Compatibility with [Laravel Debug Bar](https://github.com/barryvdh/laravel-debugbar "barryvdh/laravel-debugbar")

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

[](#installation)

To get the latest version of Laravel Error Handler, simply require the project using Composer:

```
$ composer require winternight/laravel-error-handler
```

Instead you can of course manually update the `require` block in your `composer.json` and add the `laravel-error-handler` package.

```
"require": {
    "winternight/laravel-error-handler": "^1"
},
```

### Whoops

[](#whoops)

Whoops itself is an optional dependency and you can do without Whoops on production. To install it, simply run:

```
$ composer require filp/whoops --dev
```

Both Whoops `^1.1` and `^2.1` are supported but I strongly recommend you use the latest version, especially if you already use PHP 7.

Configuration
-------------

[](#configuration)

Add the service provider in your `config/app.php` :

```
...
Winternight\LaravelErrorHandler\ServiceProvider::class,
...
```

You then need to change your `App\Exceptions\Handler` class to extend `Winternight\LaravelErrorHandler\Handlers\ExceptionHandler` rather than extending `Illuminate\Foundation\Exceptions\Handler`.

```
