<?php
namespace App\Validators;
use GuzzleHttp\Client;
class ReCaptcha
{
public function validate($attribute, $value, $parameters, $validator)
{
$client = new Client;
$response = $client->post('https://www.google.com/recaptcha/api/siteverify',
[
'form_params' =>
[
'secret' => env('GOOGLE_RECAPTCHA_SECRET'),
'response' => $value
]
]
);
$body = json_decode((string)$response->getBody());
return $body->success;
}
}
this code giving Error on server but working good locally
Class 'GuzzleHttp\Client' not found
iam going made of this error .. how it is working on localhost and not on server