承接 enjoys/forms-yandex-smartcaptcha 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

enjoys/forms-yandex-smartcaptcha

最新稳定版本:1.0.1

Composer 安装命令:

composer require enjoys/forms-yandex-smartcaptcha

包简介

Yandex SmartCaptcha for enjoys/forms

README 文档

README

addon for enjoys/forms

Run built-in server for view example

php -S localhost:8000 -t ./example .route

Usage

// ...before code

// Required. Set ID for form.
$form->setAttribute(AttributeFactory::create('id', uniqid()));
// or
new Form(id: uniqid())
// or
$form->setId(uniqid())

// Init YandexSmartCaptcha
$captcha = new YandexSmartCaptcha($Psr18_HttpClient, $Psr7RequestFactory, $Psr7StreamFactory);
$captcha
    //
    ->setPublicKey('...')
    ->setPrivateKey('...')
    ->setWidgetOptions(
        // Optional. Full options
        new WidgetOptions(
            hl: Language::RU, // Language enum or as string 'en' or null (default - null)
            callback: 'myCallback', // string or null (default - null)
            invisible: false, // bool or null (default - null)
            shieldPosition: ShieldPosition::CENTER_LEFT, // only with invisible. ShieldPosition enum or string or null  (default - null)
            hideShield: false,  // only with invisible. bool or null (default - null)
            webview: false, //bool or null (default - null)
            test: true // bool or null (default - null)
        )
    );

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-20