viecngay/lara-except-notify 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

viecngay/lara-except-notify

Composer 安装命令:

composer require viecngay/lara-except-notify

包简介

Notify when app have exceptions

README 文档

README

Notify to your slack channel when your project have exceptions

Required

  • laravel >= 5.4

Usage

Step 1: Required to your project Add your project via composer

composer require viecngay/lara-except-notify

Step 2: Register service provider If you are using laravel 5.4, you have to open config/app.php and append providers

'providers' => [
    ...
    ViecNgay\Laraexcepnotify\ServiceProvider::class,
]

If you are using laravel 5.5 or higher, skip this step. Go to step 3

Step 3: Publish vendor

php artisan vendor:publish --provider="ViecNgay\Laraexcepnotify\ServiceProvider"

Step 4: Config your channel

Open config/notification.php, you will see

<?php

return [
    'lara_exception_notify' => [
        // allow true or false
        // true is enable notify when have exception
        // false is disable notify
        'enable' => true,

        // The channel you want to nofity
        'channel' => ['slack'],

        // Your slack web hook
        // more information about slack web hook: https://api.slack.com/incoming-webhooks
        'slack_web_hook_url' => ''
    ]
];

Step 4: Add event

Open app/Exceptions/Handler.php and go to report action, change to

    // use ViecNgay\Laraexcepnotify\Events\HasExceptionEvent;

    public function report(Exception $exception)
    {
        parent::report($exception);

        if ($this->shouldReport($exception)) {
            event(new HasExceptionEvent($exception));
        }
    }

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固