Skip to content

Commit

Permalink
Make Cache::tags() support named parameters (fix #1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl authored Sep 17, 2024
1 parent f2e1648 commit ed02943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __call($method, $parameters)
throw new \Exception("Method tags() takes exactly 1 argument. $count passed.");
}

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

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

0 comments on commit ed02943

Please sign in to comment.