Update livechat

This commit is contained in:
Linksehat Staging Server
2023-08-31 13:42:04 +07:00
parent 8f74be633e
commit 18d46f09c7
2 changed files with 3 additions and 10 deletions

View File

@@ -22,15 +22,8 @@ class LivechatController extends Controller
$livechat = Livechat::with('doctor.user', 'doctor.speciality', 'appointment.appointmentDetail', 'healthCare')
->where('nIDAppointment', '!=', null)->where('nIDAppointment', '!=', '');
// dd($livechat);
if ($startDate){
$livechat->where('dStartTime', '>=', $startDate);
}
if ($endDate){
$livechat->where('dStartTime', '<=', $endDate);
}
$livechat->latest()->paginate(15);
$livechat = $livechat->latest()->paginate(15);
return response()->json(Helper::paginateResources(LivechatResource::collection($livechat)));
}