Skip to content

Commit

Permalink
Soft deleted models should still existing (#17613)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanDMeGon authored and taylorotwell committed Feb 1, 2017
1 parent 175c4bf commit 54836d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,6 @@ public function delete()

$this->performDeleteOnModel();

$this->exists = false;

// Once the model has been deleted, we will fire off the deleted event so that
// the developers may hook into post-delete operations. We will then return
// a boolean true as the delete is presumably successful on the database.
Expand Down Expand Up @@ -766,6 +764,8 @@ public function forceDelete()
protected function performDeleteOnModel()
{
$this->setKeysForSaveQuery($this->newQueryWithoutScopes())->delete();

$this->exists = false;
}

/**
Expand Down

0 comments on commit 54836d6

Please sign in to comment.