denismitr/easy-curl

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP Easy Curl

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

This package is auto-updated.

Last update: 2020-01-22 22:52:44 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, 'Нет, нет, нет!');
        }