1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00

Add tenancy()->initialized() check

This commit is contained in:
Samuel Štancl 2020-04-23 20:15:08 +02:00
parent eea252fc5c
commit 5947f14484

View file

@ -34,7 +34,8 @@ class TelescopeTags implements Feature
$tenantRoute = PreventAccessFromTenantDomains::routeHasMiddleware(request()->route(), 'tenancy')
|| PreventAccessFromTenantDomains::routeHasMiddleware(request()->route(), 'universal');
if ($tenantRoute) {
// Don't do anything if we're visiting a universal route on a central domain
if ($tenantRoute && tenancy()->initialized()) {
$tags = array_merge($tags, [
'tenant:' . tenant('id'),
]);