Hyn / Multi-Tenant laravel软件包中如何进行租户识别

时间:2018-12-03 09:53:41

标签: laravel-5 localhost multi-tenant hostname

我有一个文档中的代码可以将租户切换为:

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

但是我不知道主机名如何工作以及用户登录时如何更改主机。有人可以解释吗?

0 个答案:

没有答案