I have a date in the following format : ('Y-m-d')
I'm trying to do a query that brings all rows in a certain date but only from 12:00 AM to 1:00 AM
The following will bring the required data but for today. I need the same but for the entered date $sel_date. How can I replace the carbon::now() with $sel_date ?
->whereBetween('created_at', [
\Carbon\Carbon::now()->format('Y-m-d 00:00:00'),
\Carbon\Carbon::now()->addHours(1)->format('Y-m-d 01:00:00')
])
$sel_datevariableaddHours(1)