michaelyousrie/google-recaptcha
Composer 安装命令:
composer require michaelyousrie/google-recaptcha
包简介
README 文档
README
This is a simple package that implements google recaptcha V3 into a laravel application to make it super easy to protect forms against bots and spammers (hopefully).
How to use it?
Simple:
- you install it from composer using:
composer require michaelyousrie/google-recaptcha - Publish the config file using
php artisan vendor:publishand choose the correct number for the service providerMichael\GoogleRecpatcha\GoogleRecaptchaServiceProvider - A new config file will be published to your configuration folder (config/google_recaptcha.php). Add your google recaptcha key and secret credentials there.
- Then go to your form and add the blade directive
@google_recaptcha([FORM-ID])which will be responsible for the front-end side of the integration. - Add the middleware
Michael\GoogleRecaptcha\Middlewares\ProtectedByGoogleRecaptchawhich will be responsible for the back-end side of the integration.
On a failed recaptcha verification, the user will be redirected back to the previous page redirect()->back() and a log entry will be added to your logs. Very simple.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-07-10