【发布时间】:2015-08-06 07:31:06
【问题描述】:
当我使用下面的查询更新我的行时,它不仅会更改该行的 updated_at 列,还会更改 created_at 列。为什么?我怎样才能防止这种情况,以便它只更改 updated_at 列
Post::where('id', Input::get('post_id'))
->where('user_id', getUserID())
->update(array('message' => Input::get('message')));
【问题讨论】:
-
'Post' 模型是什么样子的