baha2odeh/yii2-recaptcha-v3 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2018-12-22