denismitr/easy-curl

PHP Easy Curl

v1.0.0 2016-06-27 16:42 UTC

README

##Installation composer require denismitr/easy-curl

###Usage

A recaptcha example:

$captchaResponse = EasyCurl::post(config('services.recaptcha.url'))
            ->send([
                'secret' => config('services.recaptcha.secret'),
                'response' => $request->input('g-recaptcha-response'),
                'remoteip' => $request->ip()
            ])
            ->getDecodedResponse();

        if ( ! isset($captchaResponse->success) || ! $captchaResponse->success) {
            abort(400, 'Нет, нет, нет!');
        }