sc0/yandex-smartcaptcha-bundle 问题修复 & 功能扩展

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

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

sc0/yandex-smartcaptcha-bundle

最新稳定版本:0.2.0

Composer 安装命令:

composer require sc0/yandex-smartcaptcha-bundle

包简介

An Yandex Smart Captcha Symfony integration

README 文档

README

Yandex Smart Captcha Symfony 6.1+ integration

Installation

Install library via composer:

composer require sc0/yandex-smartcaptcha-bundle

Add it to bundles list:

# bundles.php
<?php

return [
    // ...
    Sc\YandexSmartCaptchaBundle\YandexSmartCaptchaBundle::class => ['all' => true],
    // ...
];

Configure keys:

# /config/packages/config.yaml
yandex_smart_captcha:
    secret_key: Your_Server_Key
    site_key: Your_Client_Key

Use new Type in forms

use Sc\YandexSmartCaptchaBundle\Form\Type\YandexSmartCaptchaType;
// ...
$builder->add('captcha', YandexSmartCaptchaType::class);
// ...

Use custom HTML wrapper around the captcha:

# YourType.php
$builder->add('captcha', YandexSmartCaptchaType::class, [
    'block_prefix' => 'my_own_captcha_wrapper',
]);
{% block my_own_captcha_wrapper_widget %}
    <div class="my-captcha-container">
        {{ block('yandex_smartcaptcha_widget') }}
    </div>
{% endblock my_own_captcha_wrapper_widget %}

Use constraint in forms

use Sc\YandexSmartCaptchaBundle\Form\Type\YandexSmartCaptchaType;
use Sc\YandexSmartCaptchaBundle\Validator\Constraints\YandexSmartCaptcha;
// ...
$builder->add('captcha', YandexSmartCaptchaType::class, [
                'constraints' => [
                    new YandexSmartCaptcha()
                ],
            ]);
// ...

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固