laravel - 我的 laravel recaptcha 不工作,如何整合?
问题描述
我添加了以登录形式工作的 google recpatcha。然后我使用 auth::routes 进行忘记密码重置。这使得recaptcha 不起作用。
解决方案
if someone is still pulling their hair because of this issue just remove the 'recaptcha' in validation rule.
use
'g-recaptcha-response' => 'required'
instead of
'g-recaptcha-response' => 'required|recaptcha'
see http://tuts.codingo.me/google-recaptcha-in-laravel-application/
或者
<div class="g-recaptcha"
data-sitekey="{{env('GOOGLE_RECAPTCHA_KEY')}}">
</div>
推荐阅读
- apk - 为 Android 构建 Anywhere 7.6.4 App Container 时出错
- r - 为什么我的 R 编程“For”循环这么慢?
- php - MySQL 查询错误 - 试图在 php 和 mysql 中获取非对象的属性
- python - 在两个数据框 Python 之间执行查找
- ruby-on-rails - ActionController::UnknownFormat - 更新记录时出错
- node.js - 过滤嵌套填充数组
- php - 无法使用 ajax 在 codeIgniter 中的控制器上验证 CSRF
- python - Django Celery - 如何使康斯坦斯设置动态化
- flutter - Flutter path_provider 和 sdk 版本不匹配
- javascript - 使用JS检测用户是否在中国防火墙后面