diff --git a/src/Middleware/InitializeTenancy.php b/src/Middleware/InitializeTenancy.php index 4303ab39..3bc383ba 100644 --- a/src/Middleware/InitializeTenancy.php +++ b/src/Middleware/InitializeTenancy.php @@ -29,7 +29,7 @@ class InitializeTenancy public function handle($request, Closure $next) { try { - tenancy()->init(); + tenancy()->init($request->getHost()); } catch (TenantCouldNotBeIdentifiedException $e) { ($this->onFail)($e); } diff --git a/src/TenantManager.php b/src/TenantManager.php index 669c6468..efe8644e 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -130,7 +130,7 @@ class TenantManager /** * Find tenant by domain & initialize tenancy. * - * @param string $domain + * @param string|null $domain * @return self */ public function init(string $domain = null): self