@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(); $current_tenant_setting = App\Models\Setting::where('user_id', $current_tenant->id)->first(); @endphp