Skip to content

Commit 37b2a91

Browse files
authored
[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.
1 parent e3701f1 commit 37b2a91

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assets/TenancyServiceProvider.stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ protected function overrideUrlInTenantContext(): void
167167
// ? $tenant->domain
168168
// : $tenant->domains->first()->domain;
169169
//
170+
// if (is_null($tenantDomain)) {
171+
// return $originalRootUrl;
172+
// }
173+
//
170174
// $scheme = str($originalRootUrl)->before('://');
171175
//
172176
// if (str_contains($tenantDomain, '.')) {

0 commit comments

Comments
 (0)