Skip to content

Commit 50817b0

Browse files
authored
Update readme.md
1 parent 4cefba6 commit 50817b0

File tree

1 file changed

+37
-11
lines changed

1 file changed

+37
-11
lines changed

readme.md

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ If you want to use v3, please go to: https://github.com/RyanDaDeng/laravel-googl
2424

2525
<img src="https://github.com/RyanDaDeng/aws-study-notes/blob/master/0DB7E6BA-15ED-45E7-AA12-3CEA05E1483E.png" width="250" height="300" />
2626

27-
## Invisible
27+
## Invisible - hidden
2828

2929
<img src="https://github.com/RyanDaDeng/aws-study-notes/blob/master/881545398213_.pic.jpg" width="250" height="300" />
3030

31-
## Inline
31+
## Invisible - Inline
3232

3333
<img src="https://github.com/RyanDaDeng/aws-study-notes/blob/master/891545398531_.pic.jpg" width="250" height="300" />
3434

@@ -42,11 +42,12 @@ If you want to make your own validation rules, you have full access to modify te
4242

4343
## Features
4444

45-
- Support invisible, global and inline badge style
45+
- Support invisible, corner and inline badge style
4646
- Support multiple reCAPTCHA on the same page for different forms
4747
- Support multiple actions to be placed on the same page
4848
- Support custom implementation on config interface
4949
- Support custom implementation on request method interface
50+
- Support custom implementation on Template file
5051

5152

5253
## Requirement
@@ -89,9 +90,15 @@ And also
8990
```
9091

9192

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.
9394
```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
95102
```
96103

97104
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
135142

136143
The backend request will receive a value for 'g-recaptcha-response', please take a look at Sample Use Case and Facade usage sections.
137144

138-
## Badge Display
145+
#### Badge Display
146+
139147

140-
Inline
148+
### Checkbox
141149

142150
1. Go to config file, and set
143151
``` PHP
@@ -147,10 +155,28 @@ Inline
147155
...
148156
]
149157
```
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
151161

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+
```
152178

153-
Invisible
179+
### Invisible - hidden
154180

155181
1. Set size as invisible
156182
``` PHP
@@ -169,7 +195,7 @@ Invisible
169195
<a href="https://policies.google.com/terms">Terms of Service</a> apply.
170196
```
171197

172-
Corner
198+
### Corner
173199

174200
1. Set size as invisible
175201
``` PHP
@@ -205,7 +231,7 @@ You can also directly use registered service by calling the following method.
205231
- verifyResponse() which accepts the token value from your form. This return Google reCAPTCHA Response object.
206232

207233
``` php
208-
GoogleReCaptchaV2::setAction($action)->verifyResponse($value, $ip=null);
234+
GoogleReCaptchaV2::verifyResponse($value, $ip=null);
209235
```
210236

211237
Example Usage

0 commit comments

Comments
 (0)