当我知道开放和关闭时间时,我想以自定义格式显示开放和关闭时间,如果我有 day_id 3(星期二)的结果,那么开放时间为 08:00,关闭时间为 22:00 那么如何才能我按以下方式显示时间范围?
我希望用户从以下时间范围中选择:
08:15
08:30
08:45
. . .
21:45
在刀片视图中:
<ul>
<li>
<label class="time-picker-toggle-wrapper">
<input type="radio" value="15:15" name="time-picker" />
<span class="time-name">3:15 PM</span>
</label>
</li>
<li>
<label class="time-picker-toggle-wrapper">
<input type="radio" value="15:30" name="time-picker" />
<span class="time-name">3:30 PM</span>
</label>
</li>
<li>
<label class="time-picker-toggle-wrapper">
<input type="radio" value="15:45" name="time-picker" />
<span class="time-name">3:45 PM</span>
</label>
</li>
<li>
<label class="time-picker-toggle-wrapper">
<input type="radio" value="16:00" name="time-picker" />
<span class="time-name">4:00 PM</span>
</label>
</li>
</ul>
控制器:
$OpenHours=Storeday::where('storeinfo_id', $request->store_id)
->Where('day_id',$request->day_id)
->get();
守着星空守着你