Eloquent model not updating updated_at timestamp

后端 未结 5 647
無奈伤痛
無奈伤痛 2021-02-12 14:52

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:00

    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

提交回复
热议问题