"SEO page || route set as json with index ¯\_(ツ)_/¯ -> {"0":"komplekty"} $seo = \Yii::$app->get('seo'); $language = Language::getCurrent(); $alias = Alias::findRoute([ $id ], $language); if( empty($alias) ) throw new NotFoundHttpException(); $seo->setAlias($alias); $model = $this->findModel($alias->id, $language->id); return $this->renderPartial( 'view', [ 'model' => $model, ] ); } protected function findModel($id, $lang) { /** * @var Page $model */ $model = PageLang::find() ->where( [ 'alias_id' => $id, 'language_id' => $lang ] ) ->one(); if ( empty($model) ) throw new NotFoundHttpException('Model not found'); return $model; } }