hasOne('App\Models\User', 'id', 'user_id'); } public function operatorUser() { return $this->hasOne('App\Models\User', 'id', 'operator')->select('id','nickname','sex','mobile','app_avatar','circle_avatar'); } public function otherUser() { return $this->hasOne('App\Models\User', 'id', 'complaint_id'); } //举报用户 public function complaintUser(){ return $this->belongsTo(BlessingUsers::class, 'user_id', 'id'); } //被举报用户 public function complaintedUser(){ return $this->belongsTo(BlessingUsers::class, 'complaint_id', 'id'); } }