Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jun 29, 2021
1 parent b95af2e commit 31073e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Engines/CollectionEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ protected function searchModels(Builder $builder)
$query = $builder->model->query()
->when(count($builder->wheres) > 0, function ($query) use ($builder) {
foreach ($builder->wheres as $key => $value) {
if ($key === '__soft_deleted') {
continue;
if ($key !== '__soft_deleted') {
$query->where($key, $value);
}

$query->where($key, $value);
}
})
->orderBy($builder->model->getKeyName(), 'desc');
Expand Down

0 comments on commit 31073e4

Please sign in to comment.