Пример #1
0
 public function actionView($alias)
 {
     $model = Post::getPostByAlias($alias);
     if ($model == null) {
         throw new \yii\web\HttpException(404, 'Page not found');
     }
     return $this->render($this->module->viewTemplate, ['model' => $model]);
 }