nddcoder / laravel-http-client
Guzzle Wrapper for laravel
Installs: 34
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/nddcoder/laravel-http-client
Requires
- guzzlehttp/guzzle: 6.3.*
This package is auto-updated.
Last update: 2025-09-19 04:53:31 UTC
README
Installation
You can install the package via composer:
composer require nddcoder/laravel-http-client
Usage
Inject HttpClient into Controller Contructor
use Nddcoder\HttpClient\HttpClient; class TodoController extends Controller { private $http; public function __construct(HttpClient $http) { $this->http = $http; } public function index() { return $this->http->get('https://jsonplaceholder.typicode.com/todos'); /* { "status_code": 200, "headers": {}, "body": "...", "bodyJSON": [...] } */ } }
License
The MIT License (MIT). Please see License File for more information.