hasOne(User::class,'id','user_id'); } public function user_detail(){ return $this->belongsTo(UserDetail::class,'user_id','user_id'); } }