{{-- @php $current_domain = str_replace('.'. config('app.short_url'), '', $_SERVER['HTTP_HOST']); // to get the current tenant subdomain if it exists $current_tenant = App\Models\User::where('domain', $current_domain)->first(); @endphp --}} {{-- if the tenant subdomain doesn't exist fall back to default app --}} @if(domain($_SERVER['HTTP_HOST']) == '')