小编Mal*_*ndo的帖子

未找到列:“where 子句”中的 1054 列“orders.deleted_at”未知

在我的表中,我没有 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)

有人可以帮助我吗?如何解决这个问题?

soft-delete laravel eloquent laravel-5

0
推荐指数
1
解决办法
4803
查看次数

标签 统计

eloquent ×1

laravel ×1

laravel-5 ×1

soft-delete ×1