diff --git a/src/Relations/BelongsToThrough.php b/src/Relations/BelongsToThrough.php index 1343ba9..0ae7811 100644 --- a/src/Relations/BelongsToThrough.php +++ b/src/Relations/BelongsToThrough.php @@ -139,6 +139,9 @@ protected function getForeignKey(Model $model) protected function setSoftDeletes() { foreach ($this->models as $model) { + if ($model === $this->parent) { + continue; + } if ($this->hasSoftDeletes($model)) { $this->query->whereNull($model->getQualifiedDeletedAtColumn()); }