Skip to content

Commit

Permalink
call relationship directly to allow deletes with lazy loading disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasleitsch committed Dec 16, 2021
1 parent 284388b commit 7d35e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CascadeSoftDeletes.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected function getCascadingDeletes()
protected function getActiveCascadingDeletes()
{
return array_filter($this->getCascadingDeletes(), function ($relationship) {
return ! is_null($this->{$relationship});
return ! is_null($this->{$relationship}());
});
}
}

0 comments on commit 7d35e92

Please sign in to comment.