Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAnswer()
 {
     return $this->hasOne(Answers::className(), ['id' => 'answer_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAnswers()
 {
     return $this->hasMany(Answers::className(), ['question' => 'id']);
 }