Commit bc936d1a authored by Nguyen Van Anh's avatar Nguyen Van Anh Committed by GitHub

Merge pull request #74 from andkom/master

Custom guzzle options
parents cc0bacff d72a9e65
......@@ -34,12 +34,13 @@ class NoCaptcha
*
* @param string $secret
* @param string $sitekey
* @param array $options
*/
public function __construct($secret, $sitekey)
public function __construct($secret, $sitekey, $options = [])
{
$this->secret = $secret;
$this->sitekey = $sitekey;
$this->http = new Client([ 'timeout' => 2.0 ]);
$this->http = new Client($options);
}
/**
......
......@@ -55,7 +55,8 @@ class NoCaptchaServiceProvider extends ServiceProvider
$this->app->singleton('captcha', function ($app) {
return new NoCaptcha(
$app['config']['captcha.secret'],
$app['config']['captcha.sitekey']
$app['config']['captcha.sitekey'],
$app['config']['captcha.options']
);
});
}
......
......@@ -3,4 +3,7 @@
return [
'secret' => env('NOCAPTCHA_SECRET'),
'sitekey' => env('NOCAPTCHA_SITEKEY'),
'options' => [
'timeout' => 2.0,
],
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment