ontherocksoftware / laravelredambergreen
Laravel 包,轻松更新您的软件或服务的业务关键绩效指标(KPI)监控。
v1.0.1
2021-07-29 03:35 UTC
Requires
- guzzlehttp/guzzle: ^7.3
- illuminate/support: ~7|~8
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-09-29 05:56:47 UTC
README
快速简单地将系统或软件的实时业务 KPI 展示给用户社区。
安装
您可以通过 composer 安装此包
composer require ontherocksoftware/laravelredambergreen
您可以使用以下命令发布配置文件
php artisan vendor:publish --provider="Ontherocksoftware\LaravelRedAmberGreen\LaravelRedAmberGreenServiceProvider"
这是发布配置文件的内容
return [ /** * Your API token. Obtain from your account at https://app.red-amber.green/ */ 'token' => env('RAG_API_TOKEN','YOUR_TOKEN'), /** * If you prefer to use the service without exceptions, set this to false */ 'exceptions' => env('RAG_WITH_EXCEPTIONS',true) ];
使用方法
use Ontherocksoftware\LaravelRedAmberGreen\Facades\LaravelRedAmberGreen; /** * Assuming you added a monitor to your account named 'Stock Levels' you can interact with that monitor * using the static methods provided: */ //Your code here to check stock levels.... //If all good just set to green LaravelRedAmberGreen::green('Stock Levels'); //If you want to provide additional info you can pass a short message and a link to more in depth info LaravelRedAmberGreen::amber('Stock Levels', 'Stock levels dropped significantly in the last 24 hours', 'https://www.mysystem.com/dashboard/stocklevels'); //And of course if things are already really bad use the red method LaravelRedAmberGreen::red('Stock Levels', 'We ran out of stock for some products', 'https://www.mysystem.com/dashboard/outofstock');
变更日志
有关最近更改的更多信息,请参阅 变更日志
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件