PHP code example of henrotaym / laravel-flare-exception-handler
1. Go to this page and download the library: Download henrotaym/laravel-flare-exception-handler library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
henrotaym / laravel-flare-exception-handler example snippets
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());
}
}
namespace App\Exceptions;
use Henrotaym\LaravelFlareExceptionHandler\FlareExceptionHandler;
class Handler extends FlareExceptionHandler
{
}
/**
* Reporting exception context to flare.
*
* @param Throwable $e
* @return void
*/
protected function reportContextToFlare(Throwable $e);
shell
LOG_CHANNEL=flare