@@ -24,11 +24,11 @@ If you want to use v3, please go to: https://github.com/RyanDaDeng/laravel-googl
24
24
25
25
<img src =" https://github.com/RyanDaDeng/aws-study-notes/blob/master/0DB7E6BA-15ED-45E7-AA12-3CEA05E1483E.png " width =" 250 " height =" 300 " />
26
26
27
- ## Invisible
27
+ ## Invisible - hidden
28
28
29
29
<img src =" https://github.com/RyanDaDeng/aws-study-notes/blob/master/881545398213_.pic.jpg " width =" 250 " height =" 300 " />
30
30
31
- ## Inline
31
+ ## Invisible - Inline
32
32
33
33
<img src =" https://github.com/RyanDaDeng/aws-study-notes/blob/master/891545398531_.pic.jpg " width =" 250 " height =" 300 " />
34
34
@@ -42,11 +42,12 @@ If you want to make your own validation rules, you have full access to modify te
42
42
43
43
## Features
44
44
45
- - Support invisible, global and inline badge style
45
+ - Support invisible, corner and inline badge style
46
46
- Support multiple reCAPTCHA on the same page for different forms
47
47
- Support multiple actions to be placed on the same page
48
48
- Support custom implementation on config interface
49
49
- Support custom implementation on request method interface
50
+ - Support custom implementation on Template file
50
51
51
52
52
53
## Requirement
@@ -89,9 +90,15 @@ And also
89
90
```
90
91
91
92
92
- If your Laravel framework version is >= 5.5, just run the following command to publish views and config.
93
+ If your Laravel framework version is >= 5.5, just run the following command to publish config.
93
94
``` sh
94
- $ php artisan vendor:publish --provider=" TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider"
95
+ $ php artisan vendor:publish --provider=" TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider" --tag=googlerecaptchav2.config
96
+ ```
97
+
98
+ If you want to modify or customise your own template, you can publish a default view first:
99
+
100
+ ``` sh
101
+ $ php artisan vendor:publish --provider=" TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider" --tag=googlerecaptchav2.views
95
102
```
96
103
97
104
After installation, you should see a googlerecaptchaV2/template.blade under views folder and googlerecaptchaV2.php in your app/config folder.
@@ -135,9 +142,10 @@ Include Template script in your bottom/header of your page, params should follow
135
142
136
143
The backend request will receive a value for 'g-recaptcha-response', please take a look at Sample Use Case and Facade usage sections.
137
144
138
- ## Badge Display
145
+ #### Badge Display
146
+
139
147
140
- Inline
148
+ ### Checkbox
141
149
142
150
1 . Go to config file, and set
143
151
``` PHP
@@ -147,10 +155,28 @@ Inline
147
155
...
148
156
]
149
157
```
150
- 2 . Badge will be displayed as inline format within the form.
158
+ 2 . Badge will be displayed as checkbox format within the form.
159
+
160
+ ### Invisible - inline
151
161
162
+ 1 . Set size as invisible
163
+ ``` PHP
164
+ [
165
+ ...
166
+ 'size' => 'invisible'
167
+ ...
168
+ ]
169
+ ```
170
+ 2 . Set badge as bottomright/bottomleft
171
+ ``` PHP
172
+ [
173
+ ...
174
+ 'badge' => 'inline'
175
+ ...
176
+ ]
177
+ ```
152
178
153
- Invisible
179
+ ### Invisible - hidden
154
180
155
181
1 . Set size as invisible
156
182
``` PHP
@@ -169,7 +195,7 @@ Invisible
169
195
<a href =" https://policies.google.com/terms" >Terms of Service</a > apply.
170
196
```
171
197
172
- Corner
198
+ ### Corner
173
199
174
200
1 . Set size as invisible
175
201
``` PHP
@@ -205,7 +231,7 @@ You can also directly use registered service by calling the following method.
205
231
- verifyResponse() which accepts the token value from your form. This return Google reCAPTCHA Response object.
206
232
207
233
``` php
208
- GoogleReCaptchaV2::setAction($action)-> verifyResponse($value, $ip=null);
234
+ GoogleReCaptchaV2::verifyResponse($value, $ip=null);
209
235
```
210
236
211
237
Example Usage
0 commit comments