author | ymh <ymh.work@gmail.com> |
Fri, 21 Oct 2016 14:45:47 +0200 | |
changeset 382 | ea0e8417e4dc |
parent 139 | 8d688175513a |
child 533 | a557802f2b12 |
permissions | -rw-r--r-- |
23 | 1 |
<?php |
2 |
||
3 |
namespace CorpusParole\Providers; |
|
4 |
||
5 |
use Illuminate\Support\ServiceProvider; |
|
6 |
use GuzzleHttp\Client; |
|
7 |
||
8 |
/** |
|
9 |
* guzzle Service Provider, inspired by https://github.com/urakozz/laravel-guzzle |
|
10 |
*/ |
|
11 |
class GuzzleServiceProvider extends ServiceProvider |
|
12 |
{ |
|
13 |
/** |
|
14 |
* Register the Guzzle provider |
|
15 |
* |
|
16 |
* @return GuzzleClient |
|
17 |
*/ |
|
18 |
public function register() |
|
19 |
{ |
|
139
8d688175513a
add proxy for bnf completion and sparql request + upgrade kernel + route
ymh <ymh.work@gmail.com>
parents:
23
diff
changeset
|
20 |
$this->app->bind('Guzzle', function() { |
23 | 21 |
$config = isset($this->app['config']['guzzle']) ? $this->app['config']['guzzle'] : []; |
22 |
return new Client($config); |
|
23 |
}); |
|
24 |
} |
|
25 |
} |