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