baha2odeh/yii2-recaptcha-v3
最新稳定版本:v1.2
Composer 安装命令:
composer require baha2odeh/yii2-recaptcha-v3
包简介
Yii2 reCAPTCHA v3
关键字:
README 文档
README
Yii2 reCAPTCHA v3
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist baha2odeh/yii2-recaptcha-v3 "*"
or add
"baha2odeh/yii2-recaptcha-v3": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
add this to your components main.php
'components' => [ ... 'recaptchaV3' => [ 'class' => 'Baha2Odeh\RecaptchaV3\RecaptchaV3', 'site_key' => '###', 'secret_key' => '###', 'verify_ssl' => true, // default is true ],
and in your model
acceptance_score the minimum score for this request (0.0 - 1.0) or null
public $code; public function rules(){ return [ ... [['code'], RecaptchaV3Validator::className(), 'acceptance_score' => null] ]; }
<?= $form->field($model,'code')->widget(\Baha2Odeh\RecaptchaV3\RecaptchaV3Widget::className()); ?>
统计信息
- 总下载量: 60.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-12-22