mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:14:03 +00:00
Add macro
This commit is contained in:
parent
825a565fa2
commit
50d46139f6
1 changed files with 7 additions and 3 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue