diff --git a/src/Traits/EloquentJoinTrait.php b/src/Traits/EloquentJoinTrait.php index 2e2867e..8c7d8b0 100644 --- a/src/Traits/EloquentJoinTrait.php +++ b/src/Traits/EloquentJoinTrait.php @@ -153,9 +153,9 @@ private function leftJoinQuery($join, $relatedModel, $relatedTableAlias) if ($this->softDelete == 'withTrashed') { //do nothing } elseif ($this->softDelete == 'withoutTrashed') { - $join->where($relatedTableAlias . '.deleted_at', 'is', null); + $join->whereNull($relatedTableAlias . '.deleted_at'); } elseif ($this->softDelete == 'onlyTrashed') { - $join->where($relatedTableAlias . '.deleted_at', 'is not', null); + $join->whereNotNull($relatedTableAlias . '.deleted_at'); } } }