New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

utkarshx/laravel-guzzle-provider

Guzzle Service Provider for Laravel 6
8
Install
composer require utkarshx/laravel-guzzle-provider:dev-master
PHP:>=5.5.0
License:MIT
Last Updated:Jul 12, 2015
Links: GitHub  ·  Packagist
Maintainer: utkarshx

Laravel - Guzzle 6 (or 5) Service Provider

laravel guzzle service provider

Install With Composer:

Guzzle ~5.0

composer require utkarshx/laravel-guzzle-provider ~6.0

Or manualy in composer.json:

"require": {
    "utkarshx/laravel-guzzle-provider": "~5.0"
}

Guzzle ~6.0

composer require utkarshx/laravel-guzzle-provider ~6.0

Or manualy in composer.json:

"require": {
    "utkarshx/laravel-guzzle-provider": "~6.0"
}

Register Service Provider

/configs/app.php

    ...
    'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        ...

        /*
         * Application Service Providers...
         */
        ...
        'Utkarshx\Laravel\Providers\Guzzle'
    ],

Enable Facade

/configs/app.php

    ...
    'aliases' => [
        ...
        'Guzzle' => 'Utkarshx\Laravel\Facades\Guzzle'
    ],

Usage

Send request


  $response = \Guzzle::get('https://google.com');

Get instance

    $client = app()->offsetGet('guzzle');
    $client = \Illuminate\Container\Container::getInstance()->offsetGet('guzzle');
    $client = \Utkarshx\Laravel\Facades\Guzzle::getFacadeRoot();
    $client = \Guzzle::getFacadeRoot();

Related Packages

spondonit/zttp

A developer-experience focused HTTP client, optimized for most common use cases.

6,251 0
kozz/laravel-guzzle-provider

Guzzle 5/6 Service Provider for Laravel

1,110,076 62
eleme/laravel-guzzle

laravel guzzle service provider

6,607 6
sanchescom/laravel-guzzle

Guzzle facade for laravel.

1,994 1
webwhales/laravel-guzzle-conditional-mock-handler

Offers a way to load mocked responses conditionally with Guzzle instead of a fix...

30,548 7