From 64e297e47199fd7272ff235662ed3cf14b8b6fd5 Mon Sep 17 00:00:00 2001 From: antonkomarev Date: Fri, 27 Sep 2019 00:34:10 +0300 Subject: [PATCH] Rollback --- src/TenantManager.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TenantManager.php b/src/TenantManager.php index 82ae0e57..efe8644e 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -130,11 +130,12 @@ class TenantManager /** * Find tenant by domain & initialize tenancy. * - * @param string $domain + * @param string|null $domain * @return self */ - public function init(string $domain): self + public function init(string $domain = null): self { + $domain = $domain ?? request()->getHost(); $this->initializeTenancy($this->findByDomain($domain)); return $this;