Your appointment fills an entire day; or a user can have only one appointment per day?
Oct 19, 2022
4
Level 1
Query appointments from table
am working on system where by you create your appointment time slot its already save in the database i want to retrieve based on date but am having null when i dd the code.
{
$date = $request->date;
$appointment = Appointment::where('date',$date)->where('user_id',auth()->user()->id)->first();
if(!$appointment){
return redirect()->to('/appointment')->with('errmessage','Appointment Time not Available for this Date');
}
$appointmentId = $appointment->id;
$times = Time::where('appointment_id',$appointmentId)->get();
return $times;
return view('backend.appointment.index',compact('appointmentId','times','date'));
}```
Please or to participate in this conversation.