Looking to hire Laravel developers? Try LaraJobs

laravel-cumulio maintained by infab

Description
A laravel package to handle API calls to cumul.io
Author
Last update
2018/06/05 17:06 (dev-master)
License
Links
Downloads
476

Comments
comments powered by Disqus

Cumulio SDK wrapper for Laravel

Latest Stable Version Total Downloads

Add the service provider to your app config (config/app.php)

    # ...
    Infab\LaravelCumulio\CumulioServiceProvider::class,
    # ...

Add your credentials to the services config (config/services.php)

    'cumulio' => [
        'api_key' => env('CUMULIO_KEY', 'Your key'),
        'api_secret' => env('CUMULIO_SECRET', 'Your secret/token')
    ]

Usage

    $client = Cumulio::initialize();

    $time = new \DateTime();
    $securables[] = $dashboard_id;
    $authorization = $client->create('authorization', [
        'type' => 'temporary',
        'expiry' => $time->modify('+5 minutes')->format('c'),
        'securables' => $securables,
        'locale_id' => 'en',
    ]);

    return ['authorization' => $authorization, 'dashboard_id' => $dashboard_id];