From 5c6226befc2000e5fdee17f9f96fe2b3e4f8e1ec Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 12 Dec 2022 17:31:05 +0100 Subject: [PATCH] Use better class for the macro --- src/CacheManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CacheManager.php b/src/CacheManager.php index 80c35371..41a2bdd6 100644 --- a/src/CacheManager.php +++ b/src/CacheManager.php @@ -5,7 +5,7 @@ declare(strict_types=1); namespace Stancl\Tenancy; use Illuminate\Cache\CacheManager as BaseCacheManager; -use Illuminate\Support\Facades\Cache; +use Illuminate\Cache\Repository; // todo move to Cache namespace? @@ -44,7 +44,7 @@ class CacheManager extends BaseCacheManager public function refreshStore(string|null $repository = null): void { - Cache::macro('setStore', function ($store) { + Repository::macro('setStore', function ($store) { $this->store = $store; });