hasOne(User::class, 'id', 'id_users_right'); } public function user() { return $this->hasOne(User::class, 'id', 'id_users_left'); } public function profileCourtship() { return $this->hasOne(ProfileCourtship::class, 'user_id', 'id_users_right'); } public function recommendLogs() { return $this->hasOne(RecommendSingleHistory::class, 'user_id', 'id_users_left'); } }