i dont know how to solve this problem
here is my controller
public function actionView($id)
{
$view = (new \yii\db\Query())
->select(['blog.id', 'user_id', 'body', 'title'])
->from('blog')
->join('INNER JOIN', 'users', 'blog.user_id = users.id')
->where(['blog.id' => $id])
->one();
return $this->render('view', compact('view','id'));
}
here is my view
<div class="col-lg-4">
<h2><?= $view['name'] . ' ' . $view['surname'] ?></h2>
<h3><?= $view['title']; ?></h3>
<p><?= $view['body']; ?></p>
<a href="<?php echo yii::$app->homeUrl; ?>" class="btn btn-default">Back </a>
<?= Html::a('Delete', ['delete', 'id' => $view['id']], ['class' => 'btn btn-danger']) ?>
</div>
$viewis in the controller?