eve-php/eve-plugin-captcha 问题修复 & 功能扩展

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

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

eve-php/eve-plugin-captcha

Composer 安装命令:

composer require eve-php/eve-plugin-captcha

包简介

Google Captcha Plugin for the Eve Framework

关键字:

README 文档

README

Google Captcha for the Eve Framework

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

====

Install

composer install eve-php/eve-plugin-captcha

====

Usage

  1. Add this in public/index.php towards the top of the bootstrap chain.
//CAPTCHA
->add(Eve\Plugin\Captcha\Setup::i()->import('KEY', 'SECRET', '1234567890'))
  • 'KEY' is the ID given by Google.
  • '1234567890' is the SECRET given by Google.
  • '1234567890' is the escape key you use when writing tests for pages using this plugin.
  1. For each route, determine whether a CSRF ID should be generated and/or checked as in
'/product/create' => array(
	'method' => 'ALL',
	'make_captcha' => true,
	'check_captcha' => true,
	'class' => '\\Eve\\App\\Front\\Action\\Product\\Create'
),
  1. In each form template add before the form tag
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="form-group captcha">
	<label class="control-label">{{_ 'Are you a robot ?'}}</label>
	<div>
		<input type="hidden" name="captcha" value="{{item.captcha}}" />
		<div class="g-recaptcha" data-sitekey="{{item.captcha}}"></div>
	</div>
</div>
  1. Done ;)

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-10