I also noticed this one. I created them manually instead on my schema builder and added
->default(DB::raw('CURRENT_TIMESTAMP'));
Found it out :) … instead of insert i have to use create.
Eloquent
only use updated_at
and created_at
if $timestamps
is set to true
in your models. If you don't want to use it in your model set it to false
.
Read http://laravel.com/docs/eloquent#timestamps
class Model extends Eloquent {
...
public $timestamps = false;
...
}
One thing you should never do is to rely on DB::raw('CURRENT_TIMESTAMP')
as your database (MySQL) doesn't know what timezone you have set in your config.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community