ktith/laravel-exception-notifier

v1.0.7 2024-06-04 07:44 UTC

This package is auto-updated.

Last update: 2024-09-04 08:24:47 UTC


README

Latest Stable Version Latest Unstable Version
StyleCI Tests
GitHub contributors GitHub stars

演示

Demo Page

喜欢这个工具?请买我一杯啤酒 🍺

安装

git clone https://github.com/ktith/laravel-exception-notifier.git

Composer

安装PHP Composer

composer require ktith/aravel-exception-notifier

使用

简单使用注册事件

注意:对于Laravel 11,您可以在bootstrap/app.php中注册事件

Laravel 11的基本使用

<?php

use Ktith\Laravelexceptionnotifier\Events\ExceptionNotifier;

// for Laravel 11 bootstrap/app.php
// notify to notifire laravel 11
$exceptions->render(function (Exception $e){
    event(new ExceptionNotifier($e));
});

Laravel 10, 9, 8, 7...的基本使用

注意:对于所有这些版本,您可以在Handler.php中注册事件

<?php

use Ktith\Laravelexceptionnotifier\Events\ExceptionNotifier;


// notify to notifire by regiser
public function render($request, Throwable $exception) {
    event(new ExceptionNotifier($e));
    return parent::render($request, $exception);
}

问题

如果您遇到任何问题,请在此处报告

贡献

感谢您考虑为此项目做出贡献!请随时提交任何拉取请求,或通过titkhem167@gmail.com给我发送您希望在未来看到的功能请求。

安全漏洞

如果您在此项目中发现安全漏洞,请通过titkhem167@gmail.com发送电子邮件,如果可能的话,请创建拉取请求。所有安全漏洞都将得到及时处理。

许可

MIT: http://anthony.mit-license.org