Example #1
0
 /**
  * 定义与member的关联关系
  */
 public function getMember()
 {
     return $this->hasOne(Member::className(), ['uid' => 'user_id']);
 }
Example #2
0
 /**
  * Relation the {{%member}} table
  * One User to One Member
  * @return ActiveQuery
  */
 public function getMember()
 {
     return $this->hasOne(frontend\models\Member::className(), ['user_id' => 'id']);
 }