cakephp-captcha
An easy-to-use Captcha Plugin for the CakePHP Framework using Securimage PHP Captcha library, (*1)
Install
Add to your composer.json, (*2)
{
"require": {
"fm-labs/cakephp-captcha": "dev-master"
}
}
or run, (*3)
$ composer require fm-labs/cakephp-captcha
Quick Setup
1) Enable Plugin, (*4)
//File: config/bootstrap.php
Plugin::load('Captcha', ['bootstrap' => true, 'routes' => true);
2) Use CaptchaWidget in forms, (*5)
//File: In any view template
$this->loadHelper('Captcha.Captcha');
$this->Form->create(null);
$this->Form->input('captcha', ['type' => 'captcha']]);
//$this->Captcha->input('captcha'); // old/deprecated method
$this->Form->submit();
$this->Form->end();