diff --git a/models/ArticleLang.php b/models/ArticleLang.php index 4ece60e..b5f092c 100755 --- a/models/ArticleLang.php +++ b/models/ArticleLang.php @@ -3,6 +3,7 @@ namespace artbox\weblog\models; use artbox\core\behaviors\SlugBehavior; + use artbox\core\models\Alias; use artbox\core\models\Language; use yii\db\ActiveRecord; @@ -149,4 +150,12 @@ { return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]); } + + /** + * @return \yii\db\ActiveQuery + */ + public function getAlias() + { + return $this->hasOne(Alias::className(), ['id' => 'alias_id']); + } } -- libgit2 0.21.4