Can you run dd( $request->all() ) to see what is passing actually?
Nov 1, 2016
6
Level 13
cannot insert date into database
When I try to update some records in my database I try to set their birthdate to the "birth_date" field. Now I get this error all the time for every entry user tries to make:
Incorrect datetime value: '1963-04-20 00:00:00' for column 'birth_date' at row 1 (SQL: update `logs` set `birth_date` = 1962-03-19 00:00:00 where `id` = 238)
I created the "birth_date" field using this migration:
$table->timestamp('birth_date')->nullable();
My model has this timestamp fields:
public $dates = [
'created_at', 'updated_at', 'birth_date', 'deleted_at',
];
Any idea where things go wrong?
Please or to participate in this conversation.