wzulfikar / check-rollbar-limit
该软件包最新版本(0.0.1)没有提供许可信息。
用于检查Rollbar限制的朴素 artisan 命令
0.0.1
2017-03-13 19:45 UTC
Requires
- php: >=5.3
- illuminate/support: 4.*|5.*
- rollbar/rollbar: ~0.11
This package is not auto-updated.
Last update: 2024-09-15 04:26:04 UTC
README
Artisan 命令以检查 Rollbar 限制
- 在
config/services.php中设置 rollbar 访问令牌 - 将此包的服务提供者在你的
config/app.php中添加
'providers' => [ // .. other providers Wzulfikar\CheckRollbarLimit\CheckRollbarLimitServiceProvider::class, ];
- 运行
php artisan rollbar:check-limit
该命令将向 rollbar 发送 POST 请求并检查请求是否因超过限制而被拒绝。如果是这样,将触发事件 \Wzulfikar\CheckRollbarLimit\RollbarLimitExceededEvent::class。
要监听上述事件,你可以在 EventServiceProviders.php 中添加监听器。例如:
// app/Providers/EventServiceProvider.php protected $listen = [ \Wzulfikar\CheckRollbarLimit\RollbarLimitExceededEvent::class => [ // put your listener here ], ];