@php $subdomain = explode('.', request()->getHost())[0]; $currentTenant = \App\Models\Tenant::where('subdomain', $subdomain)->first(); $daysLeft = null; if ($currentTenant && $currentTenant->license_valid_until) { $daysLeft = now()->diffInDays(\Carbon\Carbon::parse($currentTenant->license_valid_until), false); } $adminEmail = \App\Models\GlobalSetting::where('key', 'company_email')->value('value') ?? 'Brak E-maila'; @endphp @if($daysLeft !== null && $daysLeft <= 30 && $daysLeft >= 0)