I have this intervals date send by the frontend
expires_interval : "2023-05-11T10:40:45.915Z,2023-05-18T10:40:45.915Z".
On the backend i have the following code that filters stock_entry_lines within a date range forexample between [2023-05-11, 2023-05-18]
$dates = explode(',',$request->input('expires_interval'));
$query = $query->whereBetween('stock_entry_lines.expires_at', [
Carbon::parse($dates[0])->toDateString(),
Carbon::parse($dates[1])->toDateString()
]);
in the database i have this on the expires_at column
2023-05-18 09:31:00
the issue is that i'm not getting back the stock_entry_lines within this range while in my database i have a stock_entry_lines with this date 2023-05-18 09:31:00 where am i wrong please