fledev/nocaptcha

NoCaptcha Symfony 扩展包

v0.1 2017-10-20 05:59 UTC

This package is not auto-updated.

Last update: 2024-09-29 04:36:50 UTC


README

NoCaptcha Symfony 扩展包

安装

$ composer require fledev/nocaptcha

添加到

  • AppKernel.php
    • registerBundles()
      • new FLEdev\NoCaptcha\NoCaptchaBundle()

配置

config.yml

no_captcha:
    key: 'your_google_no-captcha_key'
    secret: 'your_google_no-captcha_secret'
    validation_mesage: 'Check in if you are Human'
    wrapper_class: no-captcha-wrap
    field_class: no-captcha

使用方法

  • 定义
use FLEdev\NoCaptcha\Form\NoCaptchaType;
  • 在 "buildForm" 方法中
$builder->add('no_captcha', NoCaptchaType::class);