'Laravel sql query works for Carbon all times except midnight
i am trying to show a display schedule system and the logic is if departure time is greater than current time then dont show that schedule which then will show next time. this logic works fine for all times except when its midnight for some reason. current logic skips midnight times and jumps straight to 6:00am
$posts = DB::table('ferries')->groupBy('ferry_name')->orderBy('ferry_name', 'desc')
->where('schedule_type', '=', 'Holiday')
->where('departure_time', '>', Carbon::now()->toTimeString())
->where('terminal_name', $terminal_name)->get()->all();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
