server/src/app/Providers/GuzzleServiceProvider.php
author nowmad@nowmads-macbook-pro.local
Thu, 07 Jan 2016 17:46:50 +0100
changeset 81 848e4a5ad4d9
parent 23 037687868bc4
child 139 8d688175513a
permissions -rw-r--r--
update date params to be an array of date instead of a string

<?php

namespace CorpusParole\Providers;

use Illuminate\Support\ServiceProvider;
use GuzzleHttp\Client;

/**
 * guzzle Service Provider, inspired by https://github.com/urakozz/laravel-guzzle
 */
class GuzzleServiceProvider extends ServiceProvider
{
    /**
     * Register the Guzzle provider
     *
     * @return GuzzleClient
     */
    public function register()
    {
        $this->app->bind('guzzle', function() {
            $config = isset($this->app['config']['guzzle']) ? $this->app['config']['guzzle'] : [];
            return new Client($config);
        });
    }
}