Hi. For some reason my head wants to explode every time I get to this, and for some reason I just can't figure it out out even though its pretty straight forwards.
Im using Carbon for the dates and what I am trying to do is enable and disable a button in blade depending if the customers expiry date is due (within 7 days) or not.
So my logic is that I need to check that the $expiry is after Carbon::today()!!!
Thank you but unfortunately that didn't work... It just keeps showing!!!
Heres the dates ::
$expiry = 2018-12-05; // Should enable the button as its pithing 7 days of today
$expiry = 2018-12-07; // Should disable as its 8 days away
// Its parsed by carbon so I can use methods on the variable i.e. $expiry->addDays(7)
Hmm... I tried that as well and that didn't work either... Im going to have to look at the code and see what the heck going on!!! Or leave it as a bug for later :)
@SKOOBI - Um, if it's not working with lte, then I don't know what it can be. Maybe the dates are carbon instances, but they don't have the value you expect.
Just checked the values and they're correct. Ive been pulling my hair out on this thinking it was the query I was asking, but seems its something else. Ill see if I can dig a bit deeper and figure it out.