mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:14:03 +00:00
Initial commit
This commit is contained in:
commit
deb3ad77f5
19 changed files with 1283 additions and 0 deletions
19
src/CacheManager.php
Normal file
19
src/CacheManager.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue