PHP code example of simialbi / yii2-visualcaptcha

1. Go to this page and download the library: Download simialbi/yii2-visualcaptcha library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simialbi / yii2-visualcaptcha example snippets


[
    'bootstrap' => ['log', 'visualcaptcha'],
    'modules' => [
        'visualcaptcha' => [
            'class' => 'simialbi\yii2\visualcaptcha\Module'
        ]
    ]
]


namespace app\models;

use simialbi\yii2\visualcaptcha\validators\VisualCaptchaValidator;
use yii\base\Model;

class MyForm extends Model {
	public $name;
	public $email;
	public $subject;
	public $body;
	public $verifyCode;

	/**
	 * {@inheritdoc}
	 */
	public function rules() {
		return [
			[['name', 'email', 'subject', 'body', 'verifyCode'], '



use simialbi\yii2\visualcaptcha\widgets\VisualCaptcha;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\MyForm */

$this->title = 'Visual Captcha';
$this->params['breadcrumbs'][] = $this->title;


$ php composer.phar