MY LoginController class is extended from UserController. I want to ovverride one method of UserController. Everything works fine but $this->render('index') call the view of child class. I want to call the view of parent class. I have tried using parent::render('index') but taht dodn't work too. Here is my code
<?php
namespace frontend\controllers;
use Yii;
use mdm\admin\models\form\Login;
use mdm\admin\models\form\PasswordResetRequest;
use mdm\admin\models\form\ResetPassword;
use mdm\admin\models\form\Signup;
use mdm\admin\models\form\ChangePassword;
use mdm\admin\models\User;
use mdm\admin\models\searchs\User as UserSearch;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;
use yii\base\UserException;
use yii\mail\BaseMailer;
use mdm\admin\controllers\UserController;
class LoginController extends UserController
{
public function actionLogin()
{
//parent::actionLogin();
if (!Yii::$app->getUser()->isGuest) {
return $this->goHome();
}
$model = new Login();
if ($model->load(Yii::$app->getRequest()->post()) && $model->login()) {
return $this->goBack();
} else {
return parent::render('login', [
'model' => $model,
]);
}
}
}
But my opinion is that it should call the parent class view instead of looking it in child class. What am i missing here?