0000-00-00 00:00:00 in timestamp
laravel-4, php
Solution
You may use `new DateTime()` ! Hope this 'll hep
Problem
I was trying to seed databases in my project. When I did, only 'title' and 'post' fields are inserted, 'Created_at' and 'Updated_at' are not are not changed and show as 0000-00-00 00:00:00. I also tried with time() too. It properly work in '`php artisan tink`' but still no results are changed in database. ``` <?php class QuestionsTableSeeder extends Seeder { public function run() { DB::table('questions')->truncate(); $questions = array( 'title' => 'Simple Question Title', 'post' => 'Lorem ipsum dolor', 'created_at' => time() ); // Uncomment the below to run the seeder DB::table('questions')->insert($questions); } } ```