How To Edit created_at Date Form In Laravel (PHP)

Generic placeholder image
Brijpal Sharma
php laravel  

Date:-February 28th, 2020 , Posted On:- Web Development


This is the most common issue when developers want to edit Column created_at in the edit form in Laravel.

Today we solve an issue when we want to edit the created_at column which is Laravel generate auth when we migrate migration file. 

Note: When we migrate migration file created_at is a timestamp type column so it will store date with time.

 

How To Edit created_at Date Form In Laravel (PHP)

So when we want to edit this column we should remove the time from this timestamp.

<input type="date" name="created_at" value="{{ $data->created_at->format('Y-m-d') }}"   class="form-control" required>

How To Edit created_at Date Form In Laravel (PHP)

So here we completed How To Edit created_at Date Form In Laravel (PHP) post hope it will help you.

About the author

user profile
Brijpal Sharma

Hello, My Name is Brijpal Sharma. I am a Web Developer, Professional Blogger and Digital Marketer from India. I am the founder of Codermen. I started this blog to help web developers & bloggers by providing easy and best tutorials, articles and offers for web developers and bloggers...

0 comments

You must be logged in to post a comment.