@php $cookieAccepted = false; if (Auth::check()) { $user = Auth::user(); $latestConsent = $user->consents()->orderByDesc('accepted_at')->first(); $currentVersions = config('legal', []); if ($latestConsent && $latestConsent->terms_version === ($currentVersions['terms_version'] ?? '1.0.0') && $latestConsent->privacy_version === ($currentVersions['privacy_version'] ?? '1.0.0') && $latestConsent->cookie_version === ($currentVersions['cookie_version'] ?? '1.0.0') ) { $cookieAccepted = true; } } else { $cookieAccepted = request()->cookie('cookie_consent_accepted') === '1.0.0'; } @endphp @if(!$cookieAccepted)
@endif