Level 29
dd(Carbon::now()->timestamp);
5 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a int field that I store dates as unix timestamp like:
strtotime(Carbon::now()->addMonths(2));
But does Carbon have any function to store timestamps as integers so that I dont have to use strtotime() ?
Carbon::now()->addMonths(2)->timestamp;
Please or to participate in this conversation.