Eloquent model not updating updated_at timestamp

后端 未结 5 673
無奈伤痛
無奈伤痛 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条回答
  •  猫巷女王i
    2021-02-12 14:56

    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

提交回复
热议问题