jtelesforoantonio / laravel-guzzle-api
Integration of guzzle http client in laravel for API requests
v1.0.0
2019-10-21 20:48 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/guzzle-services: ^1.1
- monolog/monolog: ~1.12
This package is auto-updated.
Last update: 2025-02-22 08:56:09 UTC
README
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();