//User
public function clinicAgent()
{
return $this->hasOne(AgentReferral::class , 'clinic_id','id');
}
//AgentReferral
public function clinic(){
return $this->belongsTo(User::class,'clinic_id','id');
}
//has many
//user
public function doctorSchedule()
{
return $this->hasMany('App\Models\ClinicTimetable','doctor_id','id');
}
//doctor
public function doctorName()
{
return $this->belongsTo(User::class,'doctor_id','id');
}