mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 02:04:04 +00:00
extract getTenantPrefix method
This commit is contained in:
parent
94adb43f7b
commit
e2ee9ec653
1 changed files with 6 additions and 1 deletions
|
|
@ -27,11 +27,16 @@ class ScoutTenancyBootstrapper implements TenancyBootstrapper
|
||||||
$this->originalScoutPrefix = $this->config->get('scout.prefix');
|
$this->originalScoutPrefix = $this->config->get('scout.prefix');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->config->set('scout.prefix', $tenant->getTenantKey());
|
$this->config->set('scout.prefix', $this->getTenantPrefix($tenant));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function revert()
|
public function revert()
|
||||||
{
|
{
|
||||||
$this->config->set('scout.prefix', $this->originalScoutPrefix);
|
$this->config->set('scout.prefix', $this->originalScoutPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getTenantPrefix(Tenant $tenant): string
|
||||||
|
{
|
||||||
|
return (string) $tenant->getTenantKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue