mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 20:44:03 +00:00
Automatic mode
This commit is contained in:
parent
2492345280
commit
73fc525126
16 changed files with 154 additions and 40 deletions
|
|
@ -7,7 +7,7 @@ namespace Stancl\Tenancy\TenancyBootstrappers;
|
|||
use Illuminate\Contracts\Config\Repository;
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
||||
use Stancl\Tenancy\Tenant;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
||||
class RedisTenancyBootstrapper implements TenancyBootstrapper
|
||||
{
|
||||
|
|
@ -25,7 +25,7 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
|
|||
public function start(Tenant $tenant)
|
||||
{
|
||||
foreach ($this->prefixedConnections() as $connection) {
|
||||
$prefix = $this->config['tenancy.redis.prefix_base'] . $tenant['id'];
|
||||
$prefix = $this->config['tenancy.redis.prefix_base'] . $tenant->getTenantKey();
|
||||
$client = Redis::connection($connection)->client();
|
||||
|
||||
$this->originalPrefixes[$connection] = $client->getOption($client::OPT_PREFIX);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue