PHPackages                             peraleks/laravel-pretty-errors - 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. peraleks/laravel-pretty-errors

ActiveLibrary

peraleks/laravel-pretty-errors
==============================

Error formatter for Laravel.

v1.0.0(9y ago)6817MITPHPPHP ^7.0

Since Mar 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/peraleks/laravel-pretty-errors)[ Packagist](https://packagist.org/packages/peraleks/laravel-pretty-errors)[ Docs](https://github.com/peraleks/laravel-pretty-errors)[ RSS](/packages/peraleks-laravel-pretty-errors/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/f12c22062099fdafb2fea26b172927e02a94a4fe346e509e1fc8546da5bf4c90/68747470733a2f2f706f7365722e707567782e6f72672f706572616c656b732f6c61726176656c2d7072657474792d6572726f72732f642f746f74616c2e737667)](https://packagist.org/packages/peraleks/laravel-pretty-errors)[![Latest Stable Version](https://camo.githubusercontent.com/c47d49d63df12903a9fe3e5f6563f6ba60449d3c8b2adb244574179ab303a742/68747470733a2f2f706f7365722e707567782e6f72672f706572616c656b732f6c61726176656c2d7072657474792d6572726f72732f762f737461626c652e737667)](https://packagist.org/packages/peraleks/laravel-pretty-errors)[![License](https://camo.githubusercontent.com/04abc809ba00c4a56241293d129dad518e8ac419e22025b7848c008c3f19be87/68747470733a2f2f706f7365722e707567782e6f72672f706572616c656b732f6c61726176656c2d7072657474792d6572726f72732f6c6963656e73652e737667)](https://packagist.org/packages/peraleks/laravel-pretty-errors)

LaravelPrettyErrors
===================

[](#laravelprettyerrors)

Error formatter for Laravel 5.1 or later. Provides a convenient display as HTML-page and in the browser console. Provides an enhanced view of the stack trace (viewing the contents of the arguments: **array**, **closure**, **resource**, **string**; and view **PHPDoc** classes and methods). Provides the opportunity to configure custom pages **404** and **500**.

[![](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/1.png)](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/1.png)[![](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/2.png)](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/2.png)[![](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/3.png)](https://raw.githubusercontent.com/peraleks/laravel-pretty-errors/master/images/3.png)

Install
-------

[](#install)

```
$ composer require peraleks/laravel-pretty-errors
```

Usage
-----

[](#usage)

Copy file ***vendor/peraleks/laravel-pretty-errors/src/Config/pretty-errors.php*** to Laravel config\_path (***app/config***).

Add code to ***App\\Exceptions\\Handler*** :

```
use Peraleks\LaravelPrettyErrors\Core\PrettyHandler;
use Symfony\Component\Debug\Exception\FlattenException;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;

    protected function convertExceptionToResponse(Exception $e)
    {
        $html = PrettyHandler::format($e, config_path('pretty-errors.php'));

        $e = FlattenException::create($e);

        return SymfonyResponse::create($html, $e->getStatusCode(), $e->getHeaders());
    }
```

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

[](#configuration)

File ***pretty-errors.php***

```
$development = [

    \Peraleks\LaravelPrettyErrors\Notifiers\HtmlNotifier::class => [
        'enabled'       => true,   // [bool] switch error display as html
        'handleTrace'   => E_ALL,  // [int]  switch trace processing (bitwise mask)
        'simpleTrace'   => true,   // [bool] switch display arguments in trace
        'hideTrace'     => true,   // [bool] switch trace display on start
        'fontSize'      => 15,     // [int]  main font size in pixels (works as a scale)
        'stringLength'  => 80,     // [int]  line length in cells
        'tooltipLength' => 1000,   // [int]  line length in extended view
        'arrayLevel'    => 2,      // [int]  nesting level of arrays
    ],

    \Peraleks\LaravelPrettyErrors\Notifiers\BrowserConsoleNotifier::class => [
        'enabled'        => true,  // [bool]   switch error display in browser console
        'handleTrace'    => E_ALL, // [int]    switch trace processing (bitwise mask)
        'phpNativeTrace' => true,  // [bool]   switch PHP native trace display
        'console'        => 'log', // [string] browser console section (error|warn|info|log|debug)
    ],
];

$production = [

    \Peraleks\LaravelPrettyErrors\Notifiers\ProductionNotifier::class => [
        'enabled' => true,         // [bool]   switch error page display in production
        'file404' => '',           // [string] fully qualified file name or blade-template name
        'file500' => '',           // [string] fully qualified file name or blade-template name

        /* For blade-template, write 'view.404' where '404' is the name for 404.blade.php .
         You can use native PHP template. To do this, enter the fully qualified file name.

         The file may not be a template, but must return or print a string.
         For example, a file can contain such a code:

         return "Page not found";

         or

         echo view('404')->render();
         */
    ],
];
```

License
-------

[](#license)

The MIT License ([MIT](LICENSE.md)).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3326d ago

### Community

---

Top Contributors

[![peraleks](https://avatars.githubusercontent.com/u/19615952?v=4)](https://github.com/peraleks "peraleks (12 commits)")

---

Tags

debugerrorerror-handlerhandlerlaravelperalekspretty-errors

### Embed Badge

![Health badge](/badges/peraleks-laravel-pretty-errors/health.svg)

```
[![Health](https://phpackages.com/badges/peraleks-laravel-pretty-errors/health.svg)](https://phpackages.com/packages/peraleks-laravel-pretty-errors)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
