diff --git a/app/Service/v3/Implementations/AppointmentTimeService.php b/app/Service/v3/Implementations/AppointmentTimeService.php index c115d47..31c0311 100644 --- a/app/Service/v3/Implementations/AppointmentTimeService.php +++ b/app/Service/v3/Implementations/AppointmentTimeService.php @@ -42,8 +42,12 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface $time4 = array_values(array_column($stores,'time4')); $startTimeArr = array_merge($time1,$time3); $endTimeArr = array_merge($time2,$time4); - array_filter($startTimeArr); - array_filter($endTimeArr); + $startTimeArr = array_values(array_filter($startTimeArr,function ($value){ + return boolval($value); + })); + $endTimeArr = array_values(array_filter($endTimeArr,function ($value){ + return boolval($value); + })); $startTime = max($startTimeArr); $endTime = min($endTimeArr); // foreach ($stores as $store){