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