PHPackages                             dot-env-it/laravel-api-integrator - 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. [API Development](/categories/api)
4. /
5. dot-env-it/laravel-api-integrator

ActiveLibrary[API Development](/categories/api)

dot-env-it/laravel-api-integrator
=================================

Package to simplify third-party api integrations. Make API calls like they are part of your code with this package. No need to remember base url or path of any API.

v1.4.0(2mo ago)88242MITPHPPHP ^8.1 || ^8.2CI failing

Since Nov 1Pushed 1mo agoCompare

[ Source](https://github.com/dot-env-it/laravel-api-integrator)[ Packagist](https://packagist.org/packages/dot-env-it/laravel-api-integrator)[ Fund](https://paypal.me/jagdishjptl)[ Fund](https://www.buymeacoffee.com/jagdish.j.ptl)[ RSS](/packages/dot-env-it-laravel-api-integrator/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)Dependencies (15)Versions (15)Used By (0)

Laravel API Integrator
======================

[](#laravel-api-integrator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a7f8df15da460680296860e5a152d8075444ed12bacfebe20f5d825eaba20270/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f742d656e762d69742f6c61726176656c2d6170692d696e7465677261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dot-env-it/laravel-api-integrator)[![Total Downloads](https://camo.githubusercontent.com/1c8efa8a355c85d551ce3f493b5f81b4acbfe34f048c53a4c86a0b40bc621d53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f742d656e762d69742f6c61726176656c2d6170692d696e7465677261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dot-env-it/laravel-api-integrator)[![](https://camo.githubusercontent.com/d2432db86e1cfca636933728a664bf886cff501efab549a0af6abab26fe8851b/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d47697448756226636f6c6f723d253233666538653836)](https://github.com/sponsors/Jagdish-J-P)

Package to simplify third-party api integrations. Make API calls like they are part of your code with this package. No need to remember base url or path of any API. Just call it like `Integration::for('api-provider')->getSomethingCool()->json();`

Become a sponsor [![](https://camo.githubusercontent.com/d2432db86e1cfca636933728a664bf886cff501efab549a0af6abab26fe8851b/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d53706f6e736f72266d6573736167653d254532253944254134266c6f676f3d47697448756226636f6c6f723d253233666538653836)](https://github.com/sponsors/Jagdish-J-P)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#become-a-sponsor-)

Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can **[spread the word!](http://twitter.com/share?text=I+am+using+this+cool+PHP+package&url=https://github.com/dot-env-it/laravel-api-integrator&hashtags=PHP,Laravel)**

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

[](#installation)

```
composer require dot-env-it/laravel-api-integrator
```

Run `install` command to publish config file and yaml file

```
php artisan api-integrator:install
```

This command will create `api-integrator.yaml` file at root of project and `api-integrator.php` file at `config` folder

Sample `api-integrator.yaml` file

```
integrations:
  github:
    url: 'https://api.github.com/'
    auth:
      type: Bearer
      value: !config 'api-integrator.token.github'
      name: 'Authorization'

  example:
    url: 'https://api.example.com'
    auth:
      type: Header
      token: !config 'api-integrator.token.example'
      name: 'X-API-KEY'
```

#### You can pass config variables to yaml file using `!config` tag

[](#you-can-pass-config-variables-to-yaml-file-using-config-tag)

USAGE
-----

[](#usage)

```
use DotEnvIt\ApiIntegrator\Facades\Integration;

//api url https://api.github.com/foo
Integration::for('github')->get('foo')->json();

//api url https://api.example.com/foo
Integration::for('example')->get('foo')->json();
```

This package also provides a magic method for each http method

```
use DotEnvIt\ApiIntegrator\Facades\Integration;

//api url https://api.example.com/foo
Integration::for('example')->getFoo()->json();

//api url https://api.example.com/foo with dynamic token
Integration::for('example')->withToken('new-token')->getFoo()->json();

//api url https://api.example.com/foo with dynamic header
Integration::for('example')->withHeader('X-CUSTOM-HEADER', 'CUSTOM')->withHeader('X-CUSTOM-HEADER-2', 'CUSTOM-2')->getFoo()->json();

//api url https://api.example.com/foo with headers array
Integration::for('example')->withHeaders(['X-CUSTOM-HEADER' => 'CUSTOM', 'X-CUSTOM-HEADER-2' => 'CUSTOM-2'])->getFoo()->json();

//api url https://api.example.com/foo/1
Integration::for('example')->getFoo_id(['id' => 1])->json();

//api url https://api.example.com/foo/1/bar/2
Integration::for('example')->getFoo_foo_id_bar_bar_id(['foo_id' => 1, 'bar_id' => 2])->json();

//api url https://api.example.com/foo/1?foo=bar&bar=baz
Integration::for('example')->getFoo_id(['id' => 1, 'foo' => 'bar', 'bar' => 'baz'])->json();

//POST api url https://api.example.com/foo/1/bar/2/baz
Integration::for('example')->postFoo_foo_id_bar_bar_id_baz(['foo_id' => 1, 'bar_id' => 2])->json();
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jagdish-J-P](https://github.com/jagdish-j-p)
- [dot-env-it](https://github.com/dot-env-it)
- [Just Steve King](https://github.com/JustSteveKing)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance88

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 87.6% 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 ~148 days

Recently: every ~221 days

Total

7

Last Release

85d ago

PHP version history (3 changes)v1.0.0PHP ^8.2

v1.1.0PHP ^8.1

v1.1.1PHP ^8.1 || ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e7c021b8f19406056e9a24ec8d268cec00f1a9d77bd72d8cc5cb0a6fbc6a178?d=identicon)[Jagdish-J-P](/maintainers/Jagdish-J-P)

---

Top Contributors

[![Jagdish-J-P](https://avatars.githubusercontent.com/u/20887370?v=4)](https://github.com/Jagdish-J-P "Jagdish-J-P (78 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dot-env-it-laravel-api-integrator/health.svg)

```
[![Health](https://phpackages.com/badges/dot-env-it-laravel-api-integrator/health.svg)](https://phpackages.com/packages/dot-env-it-laravel-api-integrator)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M993](/packages/statamic-cms)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

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