error = 'Please complete the captcha.'; return false; } return Http::asForm()->post(self::H_CAPTCHA_VERIFY_URL, [ 'secret' => config('services.h_captcha.secret_key'), 'response' => $value, ])->json('success'); } public function validate(string $attribute, mixed $value, Closure $fail): void { if(!$this->passes($attribute, $value)) { $fail($this->message()); } } /** * Get the validation error message. * * @return string */ public function message() { return $this->error; } }