Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmail()
 {
     return $this->hasOne(Email::className(), ['id' => 'email_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmails()
 {
     return $this->hasMany(Email::className(), ['user_id' => 'id']);
 }