I am first time working on yii2.0. I have setup yii2.0_advanced_app. I have one frontend and on admin backend. I want to have captcha at my admin login. Can someone help me with this. Till now I have tried something from this page "“http://www.yiiframework.com/doc-2.0/yii-captcha-captcha.html” but it didn’t helpout.
I got error. Attached is screenshot for this error. Many other link on Google say we need to set path for captcha. If yes is there any methood to do so. Like in Joomla we have defined methood to declare paths.7003
@frontend/controllers/SiteController.php especially "actions()" method and "actionContact()" method.
@frontend/models/ContactForm.php
@frontend/views/site/contact.php
So i have copied follwing code in below file :
@backend/views/sitelogin.php
field($model, 'verifyCode')->widget(Captcha::className(), [ 'template' => '{image}{input}', ]) ?>
@common/models/adminlogin.php
extend model class public $verifyCode;
than declare in public function rules()
['verifyCode', 'captcha'],