Skip to content

Commit 162e029

Browse files
author
PGBI
committed
Model::$exists set to false on force deletion only for soft deleteable models
1 parent b648e7c commit 162e029

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Illuminate/Database/Eloquent/SoftDeletes.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ public function forceDelete()
4444
*/
4545
protected function performDeleteOnModel()
4646
{
47-
$this->exists = false;
48-
4947
if ($this->forceDeleting) {
48+
49+
$this->exists = false;
50+
5051
return $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey())->forceDelete();
5152
}
5253

0 commit comments

Comments
 (0)