Closed JMultimidia closed 3 years ago
I created the table with the start and end times of the two shifts and I would like to understand how I can put them in BusinessTime :: enable (Carbon :: class, [
I already have the following function to get the schedules
foreach ($horarios as $horario) { switch ($horario['dia']) { case "monday": $arr .= " 'monday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "tuesday": $arr .= " 'tuesday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "wednesday": $arr .= " 'wednesday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "thursday": $arr .= " 'thursday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "friday": $arr .= " 'friday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "saturday": $arr .= " 'saturday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; case "sunday": $arr .= " 'sunday' => ['".$horario['hora_inicio_01']."-".$horario['hora_fim_01']."', '".$horario['hora_inicio_02']."-".$horario['hora_fim_02']."'], "; break; } } $list .= $arr;
See https://github.com/spatie/opening-hours/issues/167
I created the table with the start and end times of the two shifts and I would like to understand how I can put them in BusinessTime :: enable (Carbon :: class, [
I already have the following function to get the schedules