edilton/exceptionmail

Envio de exeptions por email

dev-master 2019-11-29 15:02 UTC

This package is auto-updated.

Last update: 2024-10-29 04:59:12 UTC


README

Laravel package that sends mail reporting errors

Instalação

  • composer require edilton/exceptionmail dev-master

Uso

  • Deve ser configurado o envio de email no Laravel Framework Veja aqui!.

  • Adiconar o Service Provider em config/app.php

    'providers' => [
        //...
        ExceptionMail\ExceptionMailServiceProvider::class
    ]
  • Rode o seguinte comando no artisan:

    php artisan vendor:publish
  • Edit o arquivo config\exeptionmailconfig.php

    <?php

return [ 'app' => 'Nome da Aplicação', '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
      {
  ```