hasOne(User::class, 'id', 'user_id')->field('id,nickname,avatar,sn,mobile,group_id'); } public function companyInfo(){ return $this->hasOne(Company::class, 'id', 'company_id')->field('id,company_name'); } }