Skip to content

Commit ed02943

Browse files
authored
Make Cache::tags() support named parameters (fix #1256)
1 parent f2e1648 commit ed02943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CacheManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __call($method, $parameters)
2626
throw new \Exception("Method tags() takes exactly 1 argument. $count passed.");
2727
}
2828

29-
$names = $parameters[0];
29+
$names = array_values($parameters)[0];
3030
$names = (array) $names; // cache()->tags('foo') https://laravel.com/docs/5.7/cache#removing-tagged-cache-items
3131

3232
return $this->store()->tags(array_merge($tags, $names));

0 commit comments

Comments
 (0)