server/src/app/Providers/GuzzleServiceProvider.php
author ymh <ymh.work@gmail.com>
Fri, 05 Feb 2016 22:41:10 +0100
changeset 118 dbcacab69cfc
parent 23 037687868bc4
child 139 8d688175513a
permissions -rw-r--r--
upgrade ember version to v2.3.1 for bo-client

<?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);
        });
    }
}