Skip to content

Commit 7cdd61b

Browse files
committed
Merge branch 'master' of github.com:GeneaLabs/laravel-model-caching
2 parents 5f76c19 + 420192d commit 7cdd61b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CachedBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ protected function getWhereClauses() : string
7575
return collect($this->query->wheres)->reduce(function ($carry, $where) {
7676
$value = $where['value'] ?? implode('_', ($where['values'] ?? []));
7777

78+
if (! $value) {
79+
return '';
80+
}
81+
7882
return "{$carry}-{$where['column']}_{$value}";
7983
}) ?: '';
8084
}

0 commit comments

Comments
 (0)