lundi 3 décembre 2018

How to tenant identification works in Hyn/Multi-Tenant laravel package

I have a code from documentation to switch tenaants as:

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

But i don't know how host name works and how to change hosts when user login. Can some one explain?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire