edilton/exceptionmail
通过电子邮件发送异常
dev-master
2019-11-29 15:02 UTC
Requires
- php: >=5.3.9
- illuminate/support: 4.*|5.*
This package is auto-updated.
Last update: 2024-08-29 04:37:31 UTC
README
Laravel 包,用于发送错误报告邮件
安装
- composer require edilton/exceptionmail dev-master
使用
-
需要在 Laravel 框架中配置电子邮件发送,请参阅这里。
-
在 config/app.php 中添加 Service Provider
'providers' => [ //... ExceptionMail\ExceptionMailServiceProvider::class ]
-
在 artisan 中运行以下命令
php artisan vendor:publish
-
编辑 config\exeptionmailconfig.php 文件
<?php
return [ 'app' => '应用名称', 'email' => 'seuemail@seudomninio.com', 'cc' => ['fulano@dominio.com'], 'active' => env('APP_ENV', 'production') ];
* Altere o arquivo App\Exception\Handle.php para :
```php
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use ExceptionMail\Exceptions\ExceptionMailHandler;
class Handler extends ExceptionMailHandler
{
```