I'm trying to resolve a date formatting problem before sending it to the database but I'm not succeeding!
I'm using in a form the datapicker plugin, as shown in the image below:
In my Controller I have this line of code:
$agenda_exame->data = date('Y-m-d', strtotime($request->data_exame));
And you're saving the date on the bank like this: 1969-12-31
Where is the problem?