You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 10, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-121Lines changed: 1 addition & 121 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,127 +12,7 @@ Are you still using PHP 5.x or 7.0? Please go to [V2](https://github.com/biscola
12
12
13
13
## !!! Documentation !!!
14
14
15
-
Since version 3.2.0 you can find online complete documentation at [https://laravel-recaptcha-docs.biscolab.com/](https://laravel-recaptcha-docs.biscolab.com/).
16
-
For previous releases continue reading.
15
+
You can find online complete documentation at [https://laravel-recaptcha-docs.biscolab.com/](https://laravel-recaptcha-docs.biscolab.com/).
17
16
18
-
## Installation
19
-
20
-
You can install the package via composer:
21
-
```sh
22
-
composer require biscolab/laravel-recaptcha:^3.0
23
-
```
24
-
Laravel 5.5 (or greater) uses package auto-discovery, so doesn't require you to manually add the Service Provider, but if you don't use auto-discovery `ReCaptchaServiceProvider` must be registered in `config/app.php`:
'skip_ip' => [] // array of IP addresses - String: dotted quad format e.g.: 127.0.0.1
59
-
];
60
-
```
61
-
For more invermation about Site Key and Secret Key please visit [Google reCAPTCHA developer documentation](https://developers.google.com/recaptcha/docs/start)
62
-
Get more info about reCAPTCHA version at https://developers.google.com/recaptcha/docs/versions
63
-
**skip_ip** is a list of IP addresses that, if recognized, disable the reCAPTCHA validation (return always true).
64
-
65
-
### Have you updated?
66
-
If you are migrating from an older version add `skip_ip` array in `recaptcha.php` configuration file.
67
-
68
-
### Customize error message
69
-
Before starting please add the validation message to `resources/lang/[LANG]/validation.php` file
70
-
```php
71
-
return [
72
-
...
73
-
'recaptcha' => 'Hey!!! :attribute is wrong!',
74
-
];
75
-
```
76
-
77
-
## How to use
78
-
79
-
### Embed in Blade
80
-
81
-
Insert `htmlScriptTagJsApi($formId)` helper before closing `</head>` tag
82
-
You can also use `ReCaptcha::htmlScriptTagJsApi($formId)`.
83
-
`$formId` is required only if you are using **ReCAPTCHA INVISIBLE**
84
-
```blade
85
-
<!DOCTYPE html>
86
-
<html>
87
-
<head>
88
-
...
89
-
{!! htmlScriptTagJsApi(/* $formId - INVISIBLE version only */) !!}
90
-
or
91
-
{!! ReCaptcha::htmlScriptTagJsApi(/* $formId - INVISIBLE version only */) !!}
92
-
</head>
93
-
```
94
-
95
-
#### If you are using ReCAPTCHA v2
96
-
After you have to insert `htmlFormSnippet()` helper inside the form where you want to use the field `g-recaptcha-response`
97
-
You can also use `ReCaptcha::htmlFormSnippet()` .
98
-
```blade
99
-
<form>
100
-
...
101
-
{!! htmlFormSnippet() !!}
102
-
<input type="submit">
103
-
</form>
104
-
```
105
-
106
-
#### If you are using ReCAPTCHA INVISIBLE
107
-
After you have to insert `htmlFormButton($buttonInnerHTML)` helper inside the form where you want to use ReCAPTCHA. This function creates submit button therefore **you don't have to insert <inputtype="submit"> or similar**.
108
-
You can also use `ReCaptcha::htmlFormButton($buttonInnerHTML)` .
109
-
`$buttonInnerHTML` is what you want to write on the submit button
0 commit comments