2
头图
laravel-exception-notify -Supports multiple channels of laravel exception monitoring notifications (Dingding group robots, Feishu group robots, Server sauce, enterprise WeChat group robots, Xizhi).

Features

  • Monitor and send laravel application exceptions
  • Support multiple channels (Dingding group robot, Feishu group robot, Server sauce, enterprise WeChat group robot, Xizhi)
  • Customize the abnormal information data sent

Source code

Related items

Environmental requirements

  • laravel >= 5.5

installation

$ composer require guanguans/laravel-exception-notify -vvv

Configuration

Publishing service

$ php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider"

Apply for channel token and other information

Configure token and other information in the configuration file

config/exception-notify.php

use

Modify app/Exceptions/Handler.php file report method

public function report(Exception $exception)
{
    // 添加的代码
    $this->shouldReport($exception) and \ExceptionNotifier::report($exception);
    // // 或者
    // $this->shouldReport($exception) and app('exception.notifier')->report($exception);
    // // 或者
    // $this->shouldReport($exception) and \Guanguans\LaravelExceptionNotify\Facades\Notifier::report($exception);

    parent::report($exception);
}

Notification result


guanguans
2.4k 声望89 粉丝

No practice, no gain in one's wit.