Skip to content

Commit

Permalink
Merge pull request #56 from totov/main
Browse files Browse the repository at this point in the history
Fixes issue with Laravel's new strict mode on models
  • Loading branch information
michaeldyrynda authored Nov 22, 2022
2 parents 6a4826c + 976dd82 commit 6869954
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 @@ -66,7 +66,7 @@ protected function cascadeSoftDeletes($relationship)
$delete = $this->forceDeleting ? 'forceDelete' : 'delete';

foreach ($this->{$relationship}()->get() as $model) {
$model->pivot ? $model->pivot->{$delete}() : $model->{$delete}();
isset($model->pivot) ? $model->pivot->{$delete}() : $model->{$delete}();
}
}

Expand Down

0 comments on commit 6869954

Please sign in to comment.