public function doctorToday(Request $request){
$doctors = Appointment::with('doctor')->whereDate('date',date('Y-m-d'))->get();
return $doctors;
May I know how to implement one more day to the code? I want to get the tommorow’s date instead of today’s.
2
Answers
you need to add strtotime(‘+1 days’)
this should work
I would suggest using Carbon instead of
date()
.don’t forget to add the use statement at the start of the class: