@php
$captcha = config('settings.security.captcha');
$reCaptchaVersion = config('recaptcha.version', 'v2');
$isReCaptchaEnabled = (
$captcha == 'recaptcha'
&& !empty(config('recaptcha.site_key'))
&& !empty(config('recaptcha.secret_key'))
&& in_array($reCaptchaVersion, ['v2', 'v3'])
);
@endphp
@if ($isReCaptchaEnabled)
@if ($reCaptchaVersion == 'v3')
@endif
@if ($reCaptchaVersion == 'v2')
{{-- recaptcha --}}
@php
$recaptchaError = (isset($errors) && $errors->has('g-recaptcha-response')) ? ' is-invalid' : '';
@endphp
@if (isAdminPanel())
@else
@if (isset($colLeft) && isset($colRight))
{!! recaptchaHtmlFormSnippet() !!}
@else
@if (isset($label) && $label == true)
{!! recaptchaHtmlFormSnippet() !!}
@elseif (isset($noLabel) && $noLabel == true)
{!! recaptchaHtmlFormSnippet() !!}
@else
{!! recaptchaHtmlFormSnippet() !!}
@endif
@endif
@endif
@endif
@endif
@section('recaptcha_head')
@if ($isReCaptchaEnabled)
@if ($reCaptchaVersion == 'v3')
{!! recaptchaApiV3JsScriptTag([
'action' => request()->path(),
'custom_validation' => 'myCustomValidation'
]) !!}
@else
{!! recaptchaApiJsScriptTag() !!}
@endif
@endif
@endsection