imemento / exceptions-laravel
HTTP Exceptions Handler for Laravel
Installs: 2 926
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- laravel/framework: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-28 21:05:00 UTC
README
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 );