Skip to content

Commit

Permalink
Model::$exists set to false on force deletion only for soft deleteabl…
Browse files Browse the repository at this point in the history
…e models
  • Loading branch information
PGBI committed Nov 16, 2017
1 parent b648e7c commit d0865e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Eloquent/SoftDeletes.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function forceDelete()
*/
protected function performDeleteOnModel()
{
$this->exists = false;

if ($this->forceDeleting) {
$this->exists = false;

return $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey())->forceDelete();
}

Expand Down

0 comments on commit d0865e4

Please sign in to comment.