Giter Club home page Giter Club logo

laravelredambergreen's Introduction

LaravelRedAmberGreen

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.

Installation

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)

];

Usage

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

Changelog

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

License

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

laravelredambergreen's People

Contributors

otrsw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.