mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 20:54:03 +00:00
Remove request from tenant manager
This commit is contained in:
parent
cacf239801
commit
cfa9514dfb
2 changed files with 2 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ class InitializeTenancy
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
tenancy()->init();
|
tenancy()->init($request->getHost());
|
||||||
} catch (TenantCouldNotBeIdentifiedException $e) {
|
} catch (TenantCouldNotBeIdentifiedException $e) {
|
||||||
($this->onFail)($e);
|
($this->onFail)($e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,8 @@ class TenantManager
|
||||||
* @param string $domain
|
* @param string $domain
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function init(string $domain = null): self
|
public function init(string $domain): self
|
||||||
{
|
{
|
||||||
$domain = $domain ?? request()->getHost();
|
|
||||||
$this->initializeTenancy($this->findByDomain($domain));
|
$this->initializeTenancy($this->findByDomain($domain));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue