mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 10:54:04 +00:00
improve sample RootUrlBootstrapper config
This commit is contained in:
parent
dc90e60a2f
commit
27685ffe5a
1 changed files with 11 additions and 8 deletions
|
|
@ -149,14 +149,17 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
// $tenantDomain = $tenant instanceof \Stancl\Tenancy\Contracts\SingleDomainTenant
|
||||
// ? $tenant->domain
|
||||
// : $tenant->domains->first()->domain;
|
||||
//
|
||||
// $scheme = str($originalRootUrl)->before('://');
|
||||
//
|
||||
// // If you're using domain identification:
|
||||
// if (str_contains($tenantDomain, '.')) {
|
||||
// // Domain identification
|
||||
// return $scheme . '://' . $tenantDomain . '/';
|
||||
//
|
||||
// // If you're using subdomain identification:
|
||||
// $originalDomain = str($originalRootUrl)->after($scheme . '://');
|
||||
// } else {
|
||||
// // Subdomain identification
|
||||
// $originalDomain = str($originalRootUrl)->after($scheme . '://')->before('/');
|
||||
// return $scheme . '://' . $tenantDomain . '.' . $originalDomain . '/';
|
||||
// }
|
||||
// };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue