Bit of a strange error.

Ok, so I'm trying to create a support code that expires and is updated with a random code every 24 hours, however there seems to be a bit of an odd bug with carbon. Despite me adding 24 hours to carbon, the expire date is not having 24 hours added, however, the weird thing is it works with commands when I output the change as text to the command line. Also, despite me specifying utc, it doesn't seem to be using utc. The relevant code and screenshots are linked below.

Registration Code

Laravel Command


Taftse replied 1 week ago

Are you trying to add email verification ? If so you might just have a look at the email verification helper/middleware

Cameron replied 3 days ago

can you try Carbon::now()->setTimezone('UTC)->addHours(24);

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us