Why soft deleted entities appear in query results?

前端 未结 6 757
独厮守ぢ
独厮守ぢ 2020-12-30 20:06

I am trying to implement soft deleting concept.

Here is my object:

class Post extends Eloquent {

    /**
     * The database table used by the model         


        
6条回答
  •  天涯浪人
    2020-12-30 20:16

    Laravel 5.2.44 added withoutTrashed() method to SoftDeletingScope. For example you can use something like this:

    Post::withoutTrashed()->get();
    

提交回复
热议问题