Laravel 仍然希望在删除 softDelete 后找到 deleted_at 列

Laravel still expects to find deleted_at column after I remove softDelete

我刚刚通过此迁移从 table 中删除了 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