fm-labs/cakephp-captcha

该软件包最新版本(1.2.1)没有提供许可信息。

CakePHP Captcha 插件

安装: 90

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:cakephp-plugin

1.2.1 2023-03-14 12:53 UTC

This package is auto-updated.

Last update: 2024-09-14 16:07:19 UTC


README

一个易于使用的 CakePHP 框架 Captcha 插件,使用Securimage PHP Captcha 库

安装

添加到你的 composer.json 文件中

{
    "require": {
        "fm-labs/cakephp-captcha": "dev-master"
    }
}

或者运行

$ composer require fm-labs/cakephp-captcha

快速设置

  1. 启用插件

    //文件: config/bootstrap.php

    Plugin::load('Captcha', ['bootstrap' => true, 'routes' => true]);

  2. 在表单中使用 CaptchaWidget

    //文件: 在任何视图模板 $this->loadHelper('Captcha.Captcha');

    $this->Form->create(null); $this->Form->input('captcha', ['type' => 'captcha']]); //$this->Captcha->input('captcha'); //旧/过时的方法 $this->Form->submit(); $this->Form->end();