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