@@ -67,9 +67,11 @@ Please register all details on host_name, site_key, secret_key and site_verify_u
67
67
Specify your Score threshold and action in 'setting', e.g.
68
68
``` php
69
69
'setting' = [
70
+ [
70
71
'action' => 'contact_us', // Google reCAPTCHA required paramater
71
72
'threshold' => 0.2, // score threshold
72
73
'is_enabled' => false // if this is true, the system will do score comparsion against your threshold for the action
74
+ ]
73
75
]
74
76
```
75
77
Note: if you want to enable Score Comparision, you also need to enable is_score_enabled to be true.
@@ -102,7 +104,7 @@ Example Usage
102
104
@csrf
103
105
{!! GoogleReCaptchaV3::render('contact_us') !!}
104
106
105
- <input type =" submit" class = " g-recaptcha " value =" submit" >
107
+ <input type =" submit" value =" submit" >
106
108
</form >
107
109
108
110
```
@@ -123,17 +125,25 @@ You can also customise your own template under googlerecaptchav3 folder.
123
125
```
124
126
125
127
- $actionName: if its NULL, the package won't verify action with google response.
126
-
127
- #### Facade Class
128
+
129
+ #### Facade Usage
128
130
131
+ You can also directly use registered service by calling the following method.
132
+ - setAction() is optional only if you want to verify if the action is matched.
133
+ - verifyResponse() which accepts the token value from your form. This return Google reCAPTCHA Response object.
129
134
130
135
``` php
131
- GoogleReCaptchaV3::setAction($action)->verifyResponse($response );
136
+ GoogleReCaptchaV3::setAction($action)->verifyResponse($value );
132
137
```
133
138
134
- $action: Google reCAPTCHA definition
139
+ Example Usage
135
140
136
- $response: which is a value comes from g-recaptcha-response
141
+ ``` php
142
+ GoogleReCaptchaV3::verifyResponse($value)->getMessage();
143
+ GoogleReCaptchaV3::verifyResponse($value)->isSuccess();
144
+ GoogleReCaptchaV3::verifyResponse($value)->toArray();
145
+ GoogleReCaptchaV3::setAction($action)->verifyResponse($value)->isSuccess);
146
+ ```
137
147
138
148
139
149
## Advanced Usage
0 commit comments