@php
$start = request('start');
if ($start) {
$start_date = substr($start, 0, 10);
$start_time = substr($start, 11, 5);
} else {
$now = \Carbon\Carbon::now();
$start_date = $now->toDateString();
$minutes = $now->minute;
$roundedMinutes = ceil($minutes / 15) * 15;
$time = $now->copy()->minute($roundedMinutes);
if ($roundedMinutes == 60) {
$time->addHour()->minute(0);
}
$start_time = $time->format('H:i');
}
$end = request('end');
$end_time = \Carbon\Carbon::parse($start_time)->addHour()->format('H:i');
if ($start && $end) {
$end_time = \Carbon\Carbon::parse($end)->format('H:i');
}
@endphp