dulat/error-handler

Laravel error handler package

v1.0 2021-06-27 08:39 UTC

This package is auto-updated.

Last update: 2025-04-27 16:51:10 UTC


README

Laravel error handler package

Install

Install Via Composer

composer require dulat/error-handler

Publish vendor

php artisan vendor:publish

Migrate tables

php artisan migrate

Usage

After that register captureException method of App\Exceptions\Handler like this.

    use Dulat\ErrorHandler\Facades\ErrorHandler;
    ..
    
    class Handler extends ExceptionHandler
    {
        ...
    
        public function report(Exception $exception)
        {
            ErrorHandler::captureException($e);
        }
        ...  
    }

To change list of receivers, write your emails at config/error-handler.php

return [
    'send_email_to' => [
        'example1@gmail.com',
        'example2@gmail.com',
    ]
];