Question By
Unsolved

Can't insert date to the created_at column

emil-ev

Sep 19th, 2017 04:46 PM

Hi, I need a help. Sorry for my bad English! I want to add backdate function to the add form which is insert certain date to the database. (Creating backdate post) But when I check the database the NULL value inserted.

Thanks

emil-ev

Sep 19th, 2017 06:34 PM

<p>Problem solved in the voyager\src\Http\Controllers\Controller.php add after case 'timestamp':</p> <p> if ($request-&gt;isMethod('POST')) { $content = gmdate('Y-m-d H:i:s', strtotime($request-&gt;input($row-&gt;field))); } </p>