在我的表中,我没有 delete_at 列。
但在 Laravel 模型中,在 where 条件下,deleted_at 返回 null。
下面是我的代码
public function load($id) {
return $this
->select(sprintf('%s.*', $this->getTable()))
->where(sprintf('%s.id', $this->getTable(), $this->getKeyName()), '=', $id)
->first();
}
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我吗?如何解决这个问题?