Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
no-captcha
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CENTER-TBI
no-captcha
Commits
bc936d1a
Commit
bc936d1a
authored
Sep 28, 2017
by
Nguyen Van Anh
Committed by
GitHub
Sep 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74 from andkom/master
Custom guzzle options
parents
cc0bacff
d72a9e65
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
src/NoCaptcha.php
src/NoCaptcha.php
+3
-2
src/NoCaptchaServiceProvider.php
src/NoCaptchaServiceProvider.php
+2
-1
src/config/captcha.php
src/config/captcha.php
+3
-0
No files found.
src/NoCaptcha.php
View file @
bc936d1a
...
...
@@ -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
);
}
/**
...
...
src/NoCaptchaServiceProvider.php
View file @
bc936d1a
...
...
@@ -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'
]
);
});
}
...
...
src/config/captcha.php
View file @
bc936d1a
...
...
@@ -3,4 +3,7 @@
return
[
'secret'
=>
env
(
'NOCAPTCHA_SECRET'
),
'sitekey'
=>
env
(
'NOCAPTCHA_SITEKEY'
),
'options'
=>
[
'timeout'
=>
2.0
,
],
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment