Eloquent model not updating updated_at timestamp

后端 未结 5 1510
北海茫月
北海茫月 2021-02-12 14:19

I\'m using Laravel 5.1. To make it simple, I have the following code

Migration:

Schema::create(\'sitemap_data\', function (Blueprint $table) {
    // Pri         


        
5条回答
  •  礼貌的吻别
    2021-02-12 15:15

    As mentioned in comments, if the model did not change the timestamps wont be updated. However if you need to update them, or want to check if everything is working fine use $model->touch() - more here

提交回复
热议问题