render('index'); } public function actionView($author){ if( is_numeric($author) ){ $model = Authors::findOne(['id'=>$author]); }else{ $model = Authors::findOne(['url'=>$author]); } if( ( !$model instanceof Authors ) || $model->show == 0 ){ throw new NotFoundHttpException("Автор не найден"); } return $this->render("person",["model"=>$model]); } }