1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:14:04 +00:00
This commit is contained in:
antonkomarev 2019-09-27 00:34:10 +03:00
parent cfa9514dfb
commit 64e297e471

View file

@ -130,11 +130,12 @@ class TenantManager
/** /**
* Find tenant by domain & initialize tenancy. * Find tenant by domain & initialize tenancy.
* *
* @param string $domain * @param string|null $domain
* @return self * @return self
*/ */
public function init(string $domain): self public function init(string $domain = null): self
{ {
$domain = $domain ?? request()->getHost();
$this->initializeTenancy($this->findByDomain($domain)); $this->initializeTenancy($this->findByDomain($domain));
return $this; return $this;