zsr集团 / zf2nocaptcha
Google NoCaptcha for Laminas
v0.4
2022-11-22 13:15 UTC
Requires
- php: ^8.1
- google/recaptcha: ^1.2
- laminas/laminas-captcha: ^2.15.0
- laminas/laminas-form: ^3.5.0
- laminas/laminas-http: ^2.17.0
This package is not auto-updated.
Last update: 2024-09-22 07:59:07 UTC
README
此Laminas Captcha适配器使用Google的reCAPTCHA php库(见此处:https://github.com/google/recaptcha)。
##用法
- 通过composer获取
composer require srggroup/zf2nocaptcha
- 在您的Laminas模块配置中定义助手
'view_helpers'=>array(
'invokables'=>array(
'recaptcha.helper'=>'NoCaptcha\NoCaptchaHelper'
)
)
- 将其集成到表单中,就像标准的laminas recaptcha元素一样
$adapter = new \NoCaptcha\NoCaptchaAdapter($siteKey, $secreteKey);
我使用了此存储库中的一些代码: https://github.com/szmnmichalowski/ZF2-NoCaptcha