cblink / laravel-exception
Package description here.
v0.1.1
2023-02-06 02:09 UTC
Requires
- cblink/laravel-dto: ^0.3.0|^1.0.0|^2.0.0
Requires (Dev)
- orchestra/testbench: ^3.7|^3.8|^4.0|^5.0
This package is auto-updated.
Last update: 2024-11-06 05:49:59 UTC
README
.
Installing
$ composer require cblink/laravel-exception -vvv
Usage
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); } }
Contributing
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.
License
MIT