Skip to content

Commit 0cd033f

Browse files
committed
remove model from registry on delete
1 parent f1e044a commit 0cd033f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/GenericModel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ public function delete(): bool
290290
}
291291
}
292292

293+
// delete in registry
294+
if (static::$registry) {
295+
ModelRegistry::getInstance()->delete($this);
296+
}
297+
293298
return $success;
294299
}
295300

0 commit comments

Comments
 (0)