我刚刚通过此迁移从表中删除了 softDelete:
Schema::table("items", function ($table) {
$table->dropSoftDeletes();
});
但现在每个查询的结果都是:
Column not found: 1054 Unknown column 'items.deleted_at' in 'where clause'
代码没有明确引用此列。它是否被缓存在某个地方,如果是,如何清除它?
最佳答案
您还需要从模型中删除特征:
use SoftDeletes;
来自 the docs :
To enable soft deletes for a model, use the
Illuminate\Database\Eloquent\SoftDeletes
trait on the model
关于php - 在我删除 softDelete 后,Laravel 仍然希望找到 deleted_at 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48478645/