@extends('admin.adminLayout') @section('admin_page_title') Google reCAPTCHA @endsection @section('admin_content')
@php $enabled = old('enabled', (int) ($setting?->enabled ?? false)); $selectedForms = session()->getOldInput() ? old('protected_forms', []) : ($setting?->protected_forms ?? array_keys($availableForms)); $selectedForms = array_values(array_unique(array_merge( (array) $selectedForms, (array) ($requiredForms ?? []) ))); $isReady = (bool) ($setting?->enabled && filled($setting?->site_key) && $secretSaved); @endphp

Google reCAPTCHA

Visible reCAPTCHA v2 checkbox protection for public contact and authentication forms.
@if($isReady) Active and configured @elseif($setting?->enabled) Configuration incomplete @else Inactive @endif
@csrf @method('PUT')
After both keys are saved, select each authentication form you want to protect below. Admin login, client login, registration and password-recovery forms are optional. Keep the integration active to retain contact-form anti-spam protection.
@error('site_key')
{{ $message }}
@enderror
@error('secret_key')
{{ $message }}
@enderror
The secret is encrypted before database storage and is never returned to this page.
@if($secretSaved)
@endif

Protected public forms

Uncheck an authentication form to hide its widget and stop requiring a CAPTCHA token for that form. Checked forms still require server-side verification. The Public Contact setting covers all themes and footer mini-contact widgets and retains its existing anti-spam requirement.

@foreach($availableForms as $formKey => $formLabel) @php($isRequiredForm = in_array($formKey, (array) ($requiredForms ?? []), true))
@if($isRequiredForm) @endif
@endforeach
@error('protected_forms')
{{ $message }}
@enderror

Setup checklist

  1. Create a Google reCAPTCHA v2 “I’m not a robot” Checkbox key pair.
  2. Add every production and staging hostname in the Google reCAPTCHA console.
  3. Paste the site and secret keys here.
  4. Review the protected public forms, then activate the integration.
The browser widget alone is not trusted. For a selected form, each submitted token is verified by the Laravel backend before its controller runs. Unselected authentication forms do not require a token. Password checks, two-factor authentication and rate limits are unchanged.
@endsection