Level 75
@tomasosho If your $maintain->service_date is Carbon date you can use it like this
if (now()->lessThanOrEqualTo($maintain->service_date->addDays(5))) {
$notification = 'Display this';
}
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
$parts = explode('-', $$maintain->service_date);
if ($datePlusFive = date(
'Y-m-d',
mktime(0, 0, 0, $parts[1], $parts[2] + 5, $parts[0])
// ^ Month ^ Day + 5 ^ Year
) ) {
$notification = 'Display this';
}
What can i do?
Please or to participate in this conversation.