Laravel still expects to find deleted_at column after I remove softDelete

后端 未结 1 1112
长情又很酷
长情又很酷 2021-01-18 16:11

I just removed softDelete from a table with this migration:

   Schema::table(\"items\", function ($table) {
      $table->dropSoftDeletes();
   });


        
相关标签:
1条回答
  • 2021-01-18 16:55

    You also need to remove the trait from the model:

    use SoftDeletes;
    

    From the docs:

    To enable soft deletes for a model, use the Illuminate\Database\Eloquent\SoftDeletes trait on the model

    0 讨论(0)
提交回复
热议问题