Skip to content

Commit f961920

Browse files
Merge pull request #50 from lukasleitsch/feature/allow-deletes-with-lazy-loading-disabled
Call relationship directly to allow deletes with lazy loading disabled
2 parents 284388b + dd038ab commit f961920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CascadeSoftDeletes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function getCascadingDeletes()
117117
protected function getActiveCascadingDeletes()
118118
{
119119
return array_filter($this->getCascadingDeletes(), function ($relationship) {
120-
return ! is_null($this->{$relationship});
120+
return $this->{$relationship}()->exists();
121121
});
122122
}
123123
}

0 commit comments

Comments
 (0)