From 3d1ceadf34d7d941233e64f456a1d5c701f9d003 Mon Sep 17 00:00:00 2001 From: Anton Komarev <1849174+antonkomarev@users.noreply.github.com> Date: Fri, 27 Sep 2019 07:53:08 +0300 Subject: [PATCH] [2.x] Remove request helper from TenantManager (#144) * Remove request from tenant manager * Rollback --- src/Middleware/InitializeTenancy.php | 2 +- src/TenantManager.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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