1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00
This commit is contained in:
Samuel Štancl 2019-09-19 20:32:09 +02:00
parent cbaa775876
commit c9903cd43c
19 changed files with 212 additions and 215 deletions

View file

@ -13,14 +13,14 @@ class CacheManager extends BaseCacheManager
$tags = [config('tenancy.cache.tag_base') . tenant('id')];
if ($method === 'tags') {
if (\count($parameters) !== 1) {
if (count($parameters) !== 1) {
throw new \Exception("Method tags() takes exactly 1 argument. {count($parameters)} passed.");
}
$names = $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));
return $this->store()->tags(array_merge($tags, $names));
}
return $this->store()->tags($tags)->$method(...$parameters);