jtelesforoantonio/laravel-guzzle-api

Integration of guzzle http client in laravel for API requests

v1.0.0 2019-10-21 20:48 UTC

This package is auto-updated.

Last update: 2024-04-22 07:22:35 UTC


README

Total Downloads License

This package provides a quickly integration of Guzzle and Guzzle Services with Laravel to consuming web services.

Installation

Install the package with Composer.

composer require jtelesforoantonio/laravel-guzzle-api

Laravel 5.5+ uses Package Auto Discovery and you don't need to add the Service Provider manually.

Usage

Once installed you need to run the following command to publish the config file this file is the core to create the client and to integrate with web services.

php artisan vendor:publish --tag=laravel-guzzle-api-config

To call yours requests use the Facade.

use JTelesforoAntonio\LaravelGuzzleApi\Api;

$response = Api::myRequest();

Or using the helper function.

$response = api()->myRequest();