/** * @return \yii\db\ActiveQuery */ public function getNoticia() { return $this->hasOne(Noticia::className(), ['id' => 'noticia_id']); }
/** * @return \yii\db\ActiveQuery */ public function getNoticias() { return $this->hasMany(Noticia::className(), ['categoria_id' => 'id']); }