imemento/exceptions-laravel

HTTP Exceptions Handler for Laravel

Installs: 2 936

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/imemento/exceptions-laravel

8.1.1 2021-07-28 14:20 UTC

README

Build Status Latest Stable Version License Total Downloads

This is a custom exception handler that must be registered with Laravel.

Install

composer require imemento/exceptions-laravel

Add the service to config/app.php:

iMemento\Exceptions\Laravel\ExceptionsServiceProvider::class,

The exception to formatter mapping is done in the config/exceptions.php file.

Publish it if you want to add your custom mapping:

php artisan vendor:publish --tag=config

Replace the exception handler in bootstrap/app.php

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    iMemento\Exceptions\Laravel\ExceptionHandler::class
);