Skip to content

Commit

Permalink
Update src/Database/Model.php
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers authored Oct 14, 2023
1 parent 913af0c commit 821b8ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ protected function performDeleteOnRelations()
if (Arr::get($options, 'detach', true)) {
$this->{$name}()->detach();
}
} else if (in_array($type, ['belongsTo', 'hasOneThrough', 'hasManyThrough', 'morphTo'])) {
} elseif (in_array($type, ['belongsTo', 'hasOneThrough', 'hasManyThrough', 'morphTo'])) {
// the model does not own the related record, we should not remove it.
continue;
} else {
Expand Down

0 comments on commit 821b8ee

Please sign in to comment.