Skip to content

Instantly share code, notes, and snippets.

@jessedc
Last active September 17, 2015 19:46
Show Gist options
  • Save jessedc/355f19ca725d3c080baf to your computer and use it in GitHub Desktop.
Save jessedc/355f19ca725d3c080baf to your computer and use it in GitHub Desktop.
Bind Guzzle Laravel Lumen
<?php
/**
* FIXME: This really is just for one paritulcar type of jobs,
* not everything we would want to use guzzle for.
**/
$app->bind('\GuzzleHttp\ClientInterface', function ($app) {
return new \GuzzleHttp\Client([
'base_uri' => env('MAIN_SITE_URL'),
'connect_timeout' => 5,
'http_errors' => false
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment