Wallogit.com
2017 © Pedro Peláez
send exception mail for laravel
composer require csi0n/laravel-excetion
或者在composer.json中添加, (*1)
"require": {
"csi0n/exception-mail": "^1.0"
}
然后执行composer update, (*2)
在config/app.php中添加, (*3)
'providers' => [
csi0n\ExceptionEmail\ExceptionMailServiceProvider::class,
]
.....
'aliases' => [
'ExceptionEmailRepository' => csi0n\ExceptionEmail\Facades\ExceptionEmailFacade::class,
],
php artisan vendor:publish, (*4)
config/exception_mail.php
Add ExceptionEmailRepository::send($e); to app\Exceptions\Handle.php like this:, (*5)
public function render($request, Exception $e)
{
ExceptionEmailRepository::send($e);
return parent::render($request, $e);
}
Enjoy it!, (*6)