Undefined for Laravel takes care of formatting exceptions and errors into nicely formatted JSON responses.
Warning Package is in early stages of development. It means there may be bugs and API is very likely to change. Create an issue if you spot a bug. Ideas are welcome.
You can install the package via composer:
composer require red-explosion/undefined
You can publish the config file with:
php artisan vendor:publish --tag="undefined-config"
In order to use Undefined, you need to replace your exception handler. Replace the following in your
bootstrap/app.php
file:
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
with the following:
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
RedExplosion\Undefined\ExceptionHandler::class
);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover a security vulnerability, please send an e-mail to Ben Sherred via ben@redexplosion.co.uk. All security vulnerabilities will be promptly addressed.
The MIT License (MIT). Please see License File for more information.