Hi I have problem in using renderPartial, my index only shows white page or blank page.no error log.
SitController.php
public function actionIndex()
{
$model = new LoginForm();
$this->renderPartial('index', [
'model' => $model,
]);
}
views/site
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */
$this->title = 'Login';
?>
<h1><?= Html::encode($this->title) ?></h1>
<p>Please fill out the following fields to login:</p>
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'username') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= Html::submitButton('Login') ?>
<?php ActiveForm::end(); ?>
can you help me please.
Thank you in advance.