... that is greater or = to nextServiceDays.
- What is greater or = to nextServiceDays?
- Can you produce the SQL you want and we convert to eloquent for you?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am not sure if this is even possible but I have a table like this below.
Estimates: created_at updated_at service_date-> Date Service was completed nextServiceDays -> total days before next service email is sent. nextServiceEmail -> Date Email sent status
I am trying to write a query that returns all estimates with a status of 4 and nextServiceEmail is null that is greater or = to nextServiceDays.
Here is what I have but I am not sure how to incorporate the nextServiceDays.
$estimates = Estimate::
whereNull('nextServiceEmail')
//Feel Like I should do something with the date here
->where(status, 4)
->get()
Please or to participate in this conversation.