我刚从带有此迁移的表中删除了softDelete:
Schema::table("items", function ($table) {
$table->dropSoftDeletes();
});
但现在每个查询都会产生:
Column not found: 1054 Unknown column 'items.deleted_at' in 'where clause'
代码没有明确引用此列。是否已在某处缓存,如果是,如何清除它?
答案 0 :(得分:9)
您还需要从模型中删除特征:
use SoftDeletes;
来自the docs:
要为模型启用软删除,请使用模型上的
Illuminate\Database\Eloquent\SoftDeletes
特征