.
$ composer require cblink/laravel-exception -vvv
php artisan vendor:publish --provider="Cblink\LaravelException\ExceptionServiceProvider"
modify app/Exceptions/Handler.php
<?php
namespace App\Exceptions;
use Exception;
use Cblink\LaravelException\BaseHandler;
// extends `Cblink\LaravelException\BaseHandler`
class Handler extends BaseHandler
{
// ...
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param Exception $exception
*
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
// parent::render($request, $exception)
// Change as follows
return $this->renderApi($request, $exception);
}
}
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
MIT