Skip to content

Commit

Permalink
fix softDelete
Browse files Browse the repository at this point in the history
  • Loading branch information
fico7489 committed Dec 17, 2017
1 parent b58e3de commit 07f9e9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/EloquentJoinTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
Expand Down

0 comments on commit 07f9e9c

Please sign in to comment.