$query ]); return $this->render('index', [ 'dataProvider' => $dataProvider, ]); } public function actionView($translit) { return $this->render('view', [ 'model' => $this->findModel($translit), ]); } protected function findModel($translit) { if (($model = Events::findOne(["translit"=>$translit])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }