We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 536316a commit 14dcb6bCopy full SHA for 14dcb6b
src/Traits/Caching.php
@@ -10,6 +10,7 @@
10
use Illuminate\Database\Eloquent\Scope;
11
use Illuminate\Database\Query\Builder;
12
use Illuminate\Support\Carbon;
13
+use Illuminate\Support\Arr;
14
15
trait Caching
16
{
@@ -130,7 +131,7 @@ protected function getCachePrefix() : string
130
131
}
132
133
protected function makeCacheKey(
- array $columns = ['*'],
134
+ $columns = ['*'],
135
$idColumn = null,
136
string $keyDifferentiator = ''
137
) : string {
@@ -158,7 +159,7 @@ protected function makeCacheKey(
158
159
160
161
return (new CacheKey($eagerLoad, $model, $query, $this->macroKey))
- ->make($columns, $idColumn, $keyDifferentiator);
162
+ ->make(Arr::wrap($columns), $idColumn, $keyDifferentiator);
163
164
165
protected function makeCacheTags() : array
0 commit comments