We're back here again... Why does this not work for you?
$notification = Maintenance::whereBetween('service_date', [today(), today()->addDays(5)])
->get();
What result is is producing that you can't work with?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to foreach notification in my view 5days before the service_date`` service_dateis set by the user and date serviced is also set by the user asdate```. How do i go about it? The code only displays notification when the service_date = today's date
$date = date("Y-m-d");
$notification = Maintenance::where('service_date', '=', $date)->get();
We're back here again... Why does this not work for you?
$notification = Maintenance::whereBetween('service_date', [today(), today()->addDays(5)])
->get();
What result is is producing that you can't work with?
Please or to participate in this conversation.