I try to change the format of a date created by laravel with timestamps () that saves them in the format 2000-01-01 00:00:00.
I have tried in the view (blade template) within the value of an input type date:
date('y-m-d', strtotime($user->created_at))
I have tried to change the format in the controller and pass it to the already formatted view but I do a dd () and it shows me the date in format 2000-01-01 but when I get to the view I do not know what happens He shows it well.
If I format it in the view or in the driver I get this from the browser console:
The specified value "2018-12-06 21:33:09" does not conform to the required format, "yyyy-MM-dd".
I've also tried this:
$fecha = new Carbon($user->created_at);
$created = $fecha->toDateString();
Same result.