{{-- Newsletter subscribe section — email saved to the panel-scoped subscribers table. reCAPTCHA (v2 checkbox or v3 invisible) is enforced when Settings → Default setting → Enable Google reCAPTCHA is on. The reCAPTCHA script is the only CDN load on the landing; it emits nothing when reCAPTCHA is disabled. --}} @php use App\Models\Setting; $rcEnabled = (bool) Setting::get('recaptcha_enabled', false); $rcVersion = (string) Setting::get('recaptcha_version', 'v2'); $rcSiteKey = (string) Setting::get('recaptcha_site_key', ''); $subTitle = data_get($c, 'subscribe.title', __('Stay in the loop')); $subSub = data_get($c, 'subscribe.subtitle', __('Get updates on new features, service additions and exclusive offers — straight to your inbox.')); $subPh = data_get($c, 'subscribe.placeholder', __('Your email address')); $subBtn = data_get($c, 'subscribe.button', __('Subscribe')); $showCaptcha = $rcEnabled && filled($rcSiteKey); @endphp
{{ data_get($c, 'subscribe.eyebrow', __('Newsletter')) }}

{{ $subTitle }}

{{ $subSub }}

@if (session('subscribe_success')) @else
@csrf @error('subscribe_email') @enderror
@if ($showCaptcha && $rcVersion === 'v2') {{-- v2: hidden submit triggered after captcha confirms, or inline widget --}} @else @endif
{{-- v2 widget mounts here when the user clicks subscribe --}} @if ($showCaptcha && $rcVersion === 'v2')
@endif {{-- v3: hidden token field populated before submit --}} @if ($showCaptcha && $rcVersion === 'v3') @endif
@if ($showCaptcha) {{-- reCAPTCHA CDN — necessary exception to the no-CDN rule. The script only loads when the admin has enabled reCAPTCHA. --}} @if ($rcVersion === 'v2') @else {{-- v3 invisible --}} @endif @endif @endif

{{ data_get($c, 'subscribe.note', __('No spam. Unsubscribe any time.')) }}