我有一个页面模型.它在数据库表中有以下列:
- 身份证件
- 标题
- 形象
- body
I want to update only "形象" column value.
这是我的代码:
public function delImage($path, $身份证件) {
$page = Page::find($身份证件);
$page->where('形象', $path)->update(array('形象' => 'asdasd'));
\File::delete($path);
}
it throws me an error, that i am trying to use where() on a non-object. How can i correctly update my "形象" column value?