Level 15
I'm assuming you're using Blade templates here?
If that's the case, then you can just use now() helper function to make this work. Something like this:
<input type="date" value="{{ now()->format('Y-m-d') }}">
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i've form has 2 inputs date/time but its static i have an idea but don't know if its applicable or not.
i want the 2 inputs have default now();
if the didn't change its value it stored to db with the now(); date and time,
but if he changed it to another date and time the stored value be his choice,
is this can be done ?
I'm assuming you're using Blade templates here?
If that's the case, then you can just use now() helper function to make this work. Something like this:
<input type="date" value="{{ now()->format('Y-m-d') }}">
Please or to participate in this conversation.