Monday, March 13, 2017

Why updated_at on mongodb not working? Laravel 5.3

My code to insert data is like this :

Message::create([
    'subject'       => $subject,
    'information'   => $information,
    'created_at'    => Carbon::now(),
    'updated_at'    => Carbon::now()
]);

When the code executed, the result is like this :

subject:test

information:test test test

created_at:2017-03-13 20:32:29.000

updated_at:1969-12-21 09:24:58.298

Should updated_at = created_at

Why the results are different?



via moses toh

Advertisement