litermi / simple-notification
Simple Notification 是一个在出现错误时发送通知的包
1.0.20
2024-05-08 18:36 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
- illuminate/bus: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/config: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/contracts: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/database: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/http: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/notifications: ^7.20|^8.19|^9.0|^10.0|^11.0
- illuminate/support: ^7.20|^8.19|^9.0|^10.0|^11.0
- laravel/slack-notification-channel: ^2.3|^3.2
- litermi/logs: ^1.0
- dev-master / 1.0.x-dev
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- dev-feature/BAC-52-add-global-special-values-request-parameter
- dev-feature/BAC-21-delete-level-method
- dev-feature/BAC-20-add-documentation-example-usages
This package is auto-updated.
Last update: 2024-09-08 19:20:25 UTC
README
关于
Simple Notification
是一个在出现错误时发送通知的包。
如何创建 composer 包的教程
安装
在您的 composer.json
中要求 litermi/simple-notification
包并更新您的依赖项
composer require litermi/simple-notification
配置
设置提供者
'providers' => [ // ... Litermi\SimpleNotification\Providers\ServiceProvider::class, ],
默认设置在 config/simple-notification.php
中。发布配置以将文件复制到您自己的配置
php artisan vendor:publish --provider="Litermi\SimpleNotification\Providers\ServiceProvider"
注意:这是必要的,以便您可以更改默认配置
使用方法
如果没有指定 warning() 或 error() 方法,默认通知设置为日志类型。
$extraValues['test'] = 1; SimpleNotificationFacade::email()->slack()->notification('message notification', $extraValues);
通知级别的使用
如果没有指定 warning() 或 error() 方法,默认通知设置为日志类型。
$extraValues['test'] = 1; SimpleNotificationFacade::email()->slack()->warning()->notification('message notification', $extraValues); SimpleNotificationFacade::email()->slack()->error()->notification('message notification', $extraValues);
许可证
在 MIT 许可证下发布,请参阅 LICENSE。