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

Use better class for the macro

This commit is contained in:
lukinovec 2022-12-12 17:31:05 +01:00
parent bc70a2fab8
commit 5c6226befc

View file

@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Illuminate\Cache\CacheManager as BaseCacheManager; use Illuminate\Cache\CacheManager as BaseCacheManager;
use Illuminate\Support\Facades\Cache; use Illuminate\Cache\Repository;
// todo move to Cache namespace? // todo move to Cache namespace?
@ -44,7 +44,7 @@ class CacheManager extends BaseCacheManager
public function refreshStore(string|null $repository = null): void public function refreshStore(string|null $repository = null): void
{ {
Cache::macro('setStore', function ($store) { Repository::macro('setStore', function ($store) {
$this->store = $store; $this->store = $store;
}); });