findModel($id); var_dump(Url::to(Json::decode($model->lang->alias->route))); return $this->render( 'view', [ 'model' => $model, ] ); } protected function findModel($id) { $model = Page::findOne($id); if (!empty($model)) { return $model; } else { throw new NotFoundHttpException('Model not found'); } } }