Quick and simple way to expose realtime business KPIs of your system or software to your user community.
You can install the package via composer:
composer require ontherocksoftware/rag-laravel
You can publish the config file with:
php artisan vendor:publish --provider="Ontherocksoftware\RagLaravel\RagLaravelServiceProvider" --tag="rag-laravel-config"
This is the contents of the published config file:
return [
/**
* Your API token. Obtain from your account at https://red-amber.green
*/
'token' => env('RAG_API_TOKEN','YOUR_TOKEN'),
/**
* If you prefer to use the service without exception, set this to false
*/
'exceptions' => env('RAG_WITH_EXCEPTIONS',true)
];
use Ontherocksoftware\RagLaravel\RagLaravel;
/**
* Assuming you added a monitor to your account named 'Stock Levels' you can interact with that monitor
* using the static methods proivided:
*/
//Your code here to check stock levels....
//If all good just set to green
RagLaravel::green('Stock Levels');
//If you want to provide additional info you can pass a short message and a link to more in depth info
RagLaravel::amber('Stock Levels', 'Stock levels dropped significantly in the last 24 hours', 'https://www.mysystem.com/dashboard/stocklevels');
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.