1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 09:04:03 +00:00

[4.x] Fix URL override example in TenancyServiceProvider stub (#1426)

This PR fixes the URL override example in TenancyServiceProvider stub
(the commented `overrideUrlInTenantContext()` segment). If the tenant
doesn't have any domain, set the root URL back to the original one.
This commit is contained in:
lukinovec 2026-01-14 11:18:15 +01:00 committed by GitHub
parent e3701f1cc1
commit 37b2a91aa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,6 +167,10 @@ class TenancyServiceProvider extends ServiceProvider
// ? $tenant->domain
// : $tenant->domains->first()->domain;
//
// if (is_null($tenantDomain)) {
// return $originalRootUrl;
// }
//
// $scheme = str($originalRootUrl)->before('://');
//
// if (str_contains($tenantDomain, '.')) {