Laravel package to easily update business KPI monitors for your software or service.

v1.0.1 2021-07-29 03:35 UTC

This package is auto-updated.

Last update: 2024-03-29 04:33:14 UTC


Latest Version on Packagist Total Downloads GitHub Tests Action Status GitHub Code Style Action Status

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/laravelredambergreen

You can publish the config file with:

php artisan vendor:publish --provider="Ontherocksoftware\LaravelRedAmberGreen\LaravelRedAmberGreenServiceProvider"

This is the contents of the published config file:

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');


Please see CHANGELOG for more information on what has changed recently.


The MIT License (MIT). Please see License File for more information.