Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bilalfarhat24's avatar

Current Date in Laravel

How we can get current date in laravel?

0 likes
8 replies
tykus's avatar
tykus
Best Answer
Level 104

Of course, it depends on wqhat you want to do with the date! Carbon\Carbon::now() will give you a Carbon instance with the current date. If you need it in a particular format, then use Carbon's available methods to manipulate it. http://carbon.nesbot.com/docs/#api-formatting

Or, the native PHP date function might be sufficient:

date('Y-m-d H:i:s'); // 2016-10-12 21:09:23
8 likes
jithinvraj's avatar

Thank u for the help.. Carbon doesn't work properly earlier in my case...

nishant_nayan's avatar

No Need to use carbon just write php function and it will work properly

$todayDate = date("Y-m-d");

1 like
JDBC's avatar

You can directly use {{ date('Y-m-d H:i:s') }}even in any.blade.php file

Also, you can change parameters as per your wish

Example :- This will only display year {{ date('Y) }}

5 likes
tykus's avatar

@jdbc did you register just to reply to a 2 year old thread (with an answer that was already accepted too)?

sekar_r24's avatar

hi., how to increment the date, by say 10 days plus from the current date

Please or to participate in this conversation.