I have a model called Condition
which has a column called expires_at
which stores a datetime.
Basically I need to get all Conditions that are about to expire. A Condition is about to expire when there are only 5 days left to reach the stored date.
How can I achieve this with Eloquent? I need to place the logic where the where
is.
Condition::where(xxx)->get()
PS. I am using Carbon in case this helps.