Correct transaction management. cf. bug https://openrdf.atlassian.net/browse/SES-2295 and tomcat default management of PUT request with form data (application/x-www-form-urlencoded encoded)
<?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);
});
}
}