The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mdmsoft/yii2-captcha "1.0.0"
or add
"mdmsoft/yii2-captcha": "1.0.0"
for dev, using
"mdmsoft/yii2-captcha": "1.0.*@dev"
to the require section of your composer.json
file.
Once the extension is installed, simply modify your controler, add or change methode actions()
:
public function actions()
{
return [
...
'captcha' => [
'class' => 'mdm\captcha\CaptchaAction',
'level' => 3, // avaliable level are 1,2,3 :D
],
];
}