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

sekar_r24's avatar

How to add 7 days to current date in blade.

hi.,

i have field in the date format in blade file as follows.

<input type =" date" value="{{ date('Y-m-d') }}" >

i would like to add 7 days to the current date in the same field?

how this can be done?

0 likes
4 replies
dinni's avatar
dinni
Best Answer
Level 1

{{date('Y-m-d',strtotime('+7 days'))}}

rawilk's avatar

You could also use Carbon:

<input type="date" value="{{ now()->addDays(7)->format('Y-m-d') }}">
2 likes

Please or to participate in this conversation.