Код: Выделить всё
public function getContentArticles() {
return $this->hasMany(Articles::className(), ['id' => 'articles_id'])->viaTable('rel_content_articles',
['content_id' => 'id']);
}
public function getWords() {
return $this->hasOne(Words::className(), ['id' => 'words_id']);
}
Код: Выделить всё
$articles = $this->contentArticles;