PHP code example of bastinald / laravel-exception-emailer
1. Go to this page and download the library: Download bastinald/laravel-exception-emailer 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/ */
bastinald / laravel-exception-emailer example snippets
namespace App\Exceptions;
use Bastinald\LaravelExceptionEmailer\Jobs\EmailException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
public function register()
{
$this->reportable(function (Throwable $e) {
EmailException::dispatch($e->getMessage(), $this->renderExceptionContent($e));
});
}
}
'emails' => '[email protected]',
'environments' => 'production',