1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 23:14:03 +00:00

Add macro

This commit is contained in:
lukinovec 2022-12-09 12:21:37 +01:00
parent 825a565fa2
commit 50d46139f6

View file

@ -5,10 +5,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Bootstrappers;
use Illuminate\Cache\CacheManager;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Support\Facades\Cache;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\Contracts\Tenant;
use Illuminate\Support\Facades\Cache;
use Illuminate\Contracts\Config\Repository;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper
{
@ -23,6 +23,10 @@ class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper
public function bootstrap(Tenant $tenant): void
{
Cache::macro('setStore', function($store) {
$this->store = $store;
});
$this->originalPrefix = $this->config->get('cache.prefix');
$this->storeName = $this->config->get('cache.default');