예제 #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']);
 }