Eloquent model not updating updated_at timestamp

后端 未结 5 1504
北海茫月
北海茫月 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:10

    go to phpmyadmin and select your db and select the table tap on SQL tab above and type for example something like this:

    UPDATE `boshogriq_table` SET  `updated_at`= DATE_ADD(`created_at`, INTERVAL 1 MINUTE)
     WHERE  `updated_at` > DATE_ADD(`created_at`, INTERVAL 10 MINUTE)
    

    run it by go button. Laravel won't allow you do this

提交回复
热议问题