爱意满满的作品展示区。
jinfeng333

使用钉钉通知你的 Laravel 框架系统异常

  •  
  •   jinfeng333 · Jul 27, 2018 · 2958 views
    This topic created in 3022 days ago, the information mentioned may be changed or developed.

    看了 Hanson 兄弟的倍洽通知异常

    我们团队主要用钉钉,就想找个 Laravel 的钉钉通知异常的包,最好是安装后开箱即用的。

    在 Google 和 GitHub 上找了有 3 分钟还是没有找到能开箱即用的,于是自己动手丰衣足食。

    花了 20 分钟"写"(chao)了一个 Laravel 钉钉通知异常的包 wujunze/dingtalk-exception

    食用方法

    安装

    composer require wujunze/dingtalk-exception
    

    发布配置文件

    php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider
    

    配置 Handler

    app/Exceptions/Handler.php

    use Wujunze\DingTalkException\DingTalkExceptionHelper;
    
    class Handler extends ExceptionHandler
    {
      // ...
      
        public function report(Exception $exception)
        {
            DingTalkExceptionHelper::notify($exception);
            parent::report($exception);
        }
    
    }
    

    记得配置你的 config/ding.php

    效果如下

    file

    GitHub 仓库: https://github.com/wujunze/dingtalk-exception

    Inspire And Thanks

    cblink/bearychat-exception
    wowiwj/ding-notice

    Thanks

    4 replies  •  2018-07-27 23:21:32 +08:00
    jianpanxia
    jianpanxia
    Jul 27, 2018
    1
    找了有 3 分钟没有找到...
    对自己的搜索能力这么有自信?
    gaodeng
    gaodeng
    Jul 27, 2018❤️1
    2
    cool
    jinfeng333
    jinfeng333
    OP
    Jul 27, 2018
    3
    @gaodeng #2 谢谢 欢迎使用 分享
    mingyun
    mingyun
    Jul 27, 2018
    4
    大佬 20 分钟就写一个包,666
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1418 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 18:50 · PVG 02:50 · LAX 10:50 · JFK 13:50
    ♥ Do have faith in what you're doing.