/** * @return \yii\db\ActiveQuery */ public function getNews() { return $this->hasMany(News::className(), ['category_id' => 'id']); }