withOptions(['verify' => CaBundle::getSystemCaRootBundlePath()]) ->post('https://www.recaptcha.net/recaptcha/api/siteverify', [ 'secret' => $secretkey, 'response' => $value, ]) ->json()['success']; } $builder = new CaptchaBuilder(session()->pull('captcha')); return $builder->testPhrase($value); } public function message() { return option('recaptcha_secretkey') ? trans('validation.recaptcha') : trans('validation.captcha'); } }