PHPackages                             jcsilkey/laravel-guzzle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jcsilkey/laravel-guzzle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jcsilkey/laravel-guzzle
=======================

Guzzle Service Provider for Laravel

0.2.2(7y ago)05[2 issues](https://github.com/jcsilkey/laravel-guzzle/issues)MITPHPPHP &gt;=7.2.0

Since Jun 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jcsilkey/laravel-guzzle)[ Packagist](https://packagist.org/packages/jcsilkey/laravel-guzzle)[ RSS](/packages/jcsilkey-laravel-guzzle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Laravel Guzzle - Laravel Guzzle HTTP Client Manager
===================================================

[](#laravel-guzzle---laravel-guzzle-http-client-manager)

This package provides a mechanism to configure one or more Guzzle clients for use in an application.

Installation
------------

[](#installation)

Install with:

`composer require jcsilkey/laravel-guzzle`

With auto package discovery, the ServiceProvider is automatically registered. No facade is or ever will be provided because facades are evil.

Publish the configuration:

`php artisan vendor:publish --tag="config"`

Usage
-----

[](#usage)

This package registers 2 services:

### `GuzzleHttp\ClientInterface`

[](#guzzlehttpclientinterface)

Resolves to the default client defined in the package configuration.

### `JCS\LaravelGuzzle\GuzzleClientRegistry`

[](#jcslaravelguzzleguzzleclientregistry)

Resolves to the client registry, which holds all clients. `GuzzleClientRegistry@getClient()` will return the default client. Pass a client name to get a specific client, `GuzzleClientRegistry@getClient($clientName)`.

Configuration
-------------

[](#configuration)

The default configuration is minimal:

```
return [
    'default' => env('GUZZLE_DEFAULT_CLIENT', null),
    'global' => [],
    'clients' => []
    ]
];

```

### `default`

[](#default)

The name of the default client. If this value is `null`, then a client named 'default' will be created using the settings defined in `global`. If a name is given, then it must be a valid client defined in `clients`.

### `global`

[](#global)

Default configuration options to be used for all clients. Any valid Guzzle configuration option can be used.

### `clients`

[](#clients)

An array of named clients, along with configuration options for each. For example:

```
    'clients' => [
        'example_api' => [
            'base_uri' => 'https://api.example.com'
        ],
        'example_api2' => [
            'base_uri' => 'https://api2.example.com'
        ],
    ]

```

Client options are merged with the global options defined above (shallow merge, top level keys only).

### Configuring Handlers and Middlewares

[](#configuring-handlers-and-middlewares)

To define a custom Handler and Guzzle Middleware stack, use the normal guzzle `handler` option to specify a handler class and a special `middleware` option that is an array of middlewares to be added to your client. Each middleware definition is itself an array consisting of a `callable` and the `name` to register for the middleware. For example:

```
    `handler` => 'GuzzleHttp\Handler\CurlHandler',
    'middleware' => [
        [
            'callable' => 'GuzzleHttp\Middleware::httpErrors',
            'name' => 'http_errors'
        ],
    ]

```

If no `handler` is specified, one will be automatically selected for you based on your PHP configuration.

If no `middleware` are defined, your Guzzle client will be created using the default

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

2900d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0995074b7e20d6f5efab38a8e956a12dbaf93f8ef3592d11c5d884d631f8658a?d=identicon)[jcsilkey](/maintainers/jcsilkey)

---

Top Contributors

[![jcsilkey](https://avatars.githubusercontent.com/u/1775194?v=4)](https://github.com/jcsilkey "jcsilkey (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jcsilkey-laravel-guzzle/health.svg)

```
[![Health](https://phpackages.com/badges/jcsilkey-laravel-guzzle/health.svg)](https://phpackages.com/packages/jcsilkey-laravel-guzzle)
```

###  Alternatives

[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
