我有一个文档中的代码可以将租户切换为:
use Hyn\Tenancy\Environment;
$tenancy = app(Environment::class);
$tenancy->hostname($hostname);
$tenancy->hostname(); // resolves $hostname as currently active hostname
$tenancy->tenant($website); // switches the tenant and reconfigures the app
$tenancy->website(); // resolves $website
$tenancy->tenant(); // resolves $website
$tenancy->identifyHostname(); // resets resolving $hostname by using the Request
但是我不知道主机名如何工作以及用户登录时如何更改主机。有人可以解释吗?