mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 05:14:05 +00:00
19 lines
471 B
PHP
19 lines
471 B
PHP
<?php
|
|
|
|
namespace Stancl\Tenancy;
|
|
|
|
use Illuminate\Cache\CacheManager as BaseCacheManager;
|
|
|
|
class CacheManager extends BaseCacheManager
|
|
{
|
|
public function __call($method, $parameters)
|
|
{
|
|
$tags = [config('tenancy.cache.prefix_base') . tenant('uuid')];
|
|
|
|
if ($method === "tags") {
|
|
return $this->store()->tags(array_merge($tags, ...$parameters));
|
|
}
|
|
|
|
return $this->store()->tags($tags)->$method(...$parameters);
|
|
}
|
|
}
|