laravel-recaptcha-v3 maintained by huangdijia
Description
recaptcha-v3 for laravel
Author
Last update
2024/03/08 07:17
(dev-main)
License
Downloads
11 188
Tags
Last update
2024/03/08 07:17
License
Require
- php >=8.0
- google/recaptcha ^1.2
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/console ^9.0|^10.0|^11.0
Last update
2023/07/31 07:22
License
Require
- php >=8.0
- google/recaptcha ^1.2
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/console ^9.0|^10.0|^11.0
Last update
2023/07/31 06:25
License
Require
- google/recaptcha ^1.2
- php >=8.0
- illuminate/support ^9.0|^10.0
- illuminate/console ^9.0|^10.0
Last update
2023/01/11 01:08
License
Require
- php >=8.0
- google/recaptcha ^1.2
- illuminate/support ^9.0|^10.0
- illuminate/console ^9.0|^10.0
Last update
2022/03/09 01:11
License
Require
- php >=8.0
- google/recaptcha ^1.2
- illuminate/support ^9.0
- illuminate/console ^9.0
Last update
2021/05/10 08:07
License
Require
- php >=7.3.0
- google/recaptcha ^1.2
- illuminate/support ^8.0|^9.0
- illuminate/console ^8.0|^9.0
Last update
2021/03/26 08:37
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^6.0|^7.0|^8.0
- illuminate/console ^5.7|^6.0|^7.0|^8.0
Last update
2021/03/26 08:37
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^6.0|^7.0|^8.0
- illuminate/console ^5.7|^6.0|^7.0|^8.0
Last update
2020/09/21 04:39
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^6.0|^7.0|^8.0
- illuminate/console ^5.7|^6.0|^7.0|^8.0
Last update
2020/04/20 02:30
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^5.8|^6.0|^7.0
- illuminate/console ^5.7|^5.8|^6.0|^7.0
Last update
2020/03/16 06:08
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^5.8|^6.0|^7.0
- illuminate/console ^5.7|^5.8|^6.0|^7.0
Last update
2020/03/04 10:10
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^5.8|^6.0|^7.0
- illuminate/console ^5.7|^5.8|^6.0|^7.0
Last update
2019/09/11 03:19
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.7|^5.8|^6.0|6.0
- illuminate/console ^5.7|^5.8|^6.0|6.0
Last update
2019/09/04 07:40
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ^5.5|^5.6|^5.7|^5.8|^6.0
- illuminate/console ^5.5|^5.6|^5.7|^5.8|^6.0
Last update
2019/08/09 11:21
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0.0
Last update
2019/05/14 12:22
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0
Last update
2019/05/14 09:25
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0
Last update
2019/05/14 09:13
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0
Last update
2019/05/06 02:29
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0
Last update
2019/02/13 08:25
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support ~5.5.0|~5.6.0|~5.7.0|~5.8.0
- illuminate/console ~5.5.0|~5.6.0|~5.7.0|~5.8.0
Last update
2018/12/20 09:49
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/20 09:44
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/20 00:31
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 13:14
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 12:39
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 12:35
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 12:04
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 04:01
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 03:38
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 02:33
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 02:30
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 02:29
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Last update
2018/12/19 02:27
License
Require
- php >=7.0.0
- google/recaptcha ^1.2
- illuminate/support 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
- illuminate/console 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*
Google reCaptcha v3 for Laravel 5.6+
Installation
To install, simply add it
to your composer.json file:
{
"require": {
"huangdijia/laravel-recaptcha-v3": "^3.0"
}
}
And run composer to update your dependencies:
composer update
Or you can simply run
composer require huangdijia/laravel-recaptcha-v3
Publish configuration file to your config folder with command:
php artisan vendor:publish --provider="Huangdijia\Recaptcha\RecaptchaServiceProvider" --tag=config
Usage
Forms
// default
@recaptcha_field()
// custom
@recaptcha_field(['site_key'=>'your_key', 'name'=>'input_name'])
Init Recaptcha Javascript
Must add after @recaptcha_field()
Recaptcha v3 works best when it is loaded on every page to get the most context about interactions. Therefore, add to your header or footer template:
// default
@recaptcha_initjs()
// custom
@recaptcha_initjs(['site_key'=>'your_key', 'action' => 'action_name', 'name'=>'input_name'])
Validation as regular validation rule
Use as regular validation rule recaptcha:{ACTION},{SCORE},{HOSTNAME} like:
Validator::make($request->all(), [
'g-recaptcha-response' => 'required|recaptcha:register,0.5,www.a.com',
// or
// 'g-recaptcha-response' => 'required|recaptcha',
]);
Validation as middleware
Set $routeMiddleware
$routeMiddleware = [
// ...
'recaptcha' => Huangdijia\Recaptcha\Middleware\ReCaptcha::class,
];
Use with route
Route::get('/path')->middleware('recaptcha');
Route::get('/path')->middleware('recaptcha:{ACTION},{SCORE},{HOSTNAME}');
Hidden ReCAPTCHA
.grecaptcha-badge {
display: none;
}

