Simple exception handler logging exception context to flare.
henrotaym/laravel-flare-exception-handler is a Laravel package for simple exception handler logging exception context to flare..
It currently has 0 GitHub stars and 7.217 downloads on Packagist (latest version v4.0.1).
Install it with composer require henrotaym/laravel-flare-exception-handler.
Discover more Laravel packages by henrotaym
or browse all Laravel packages to compare alternatives.
Last updated
| Version de laravel | Version du package | |--|--| | 7.x.x | 1.x.x | | 8.x.x | 2.x.x | | 9.x.x | 2.x.x | | 10.x.x | 3.x.x | | 11.x.x | 3.x.x | | 12.x.x | 4.x.x |
composer require henrotaym/laravel-flare-exception-handler
LOG_CHANNEL=flare
namespace App\Exceptions;
use Henrotaym\LaravelFlareExceptionHandler\Context\FlareContext;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
public function register()
{
// Add this line to report context to flare
$this->reportable(FlareContext::report());
}
}
Your application Handler.php should look like this
namespace App\Exceptions;
use Henrotaym\LaravelFlareExceptionHandler\FlareExceptionHandler;
class Handler extends FlareExceptionHandler
{
}
If you need more control, override register method from handler and call this method where needed :
/**
* Reporting exception context to flare.
*
* @param Throwable $e
* @return void
*/
protected function reportContextToFlare(Throwable $e);