操作数据库报错: 原因:migrate迁移自动生成两个时间,用model执行sql都会更新这两个时间,所以要在model中这是不更新这两个时间。 解决:在xx.model里面加上public $timestamps = false; 相关文章: