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. dot-env-it/laravel-api-integrator

ActiveLibrary

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.3.0(2y ago)87452[7 PRs](https://github.com/dot-env-it/laravel-api-integrator/pulls)MITPHPPHP ^8.1 || ^8.2CI passing

Since Nov 1Pushed 3mo 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 1mo ago

READMEChangelog (5)Dependencies (7)Versions (13)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)[![GitHub Actions](https://github.com/dot-env-it/laravel-api-integrator/actions/workflows/laravel.yml/badge.svg)](https://github.com/dot-env-it/laravel-api-integrator/actions/workflows/laravel.yml/badge.svg)[![](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

41

—

FairBetter than 88% of packages

Maintenance57

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.8% 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 ~2 days

Total

5

Last Release

909d 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 (55 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 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

[sylius/sylius

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

8.4k5.6M647](/packages/sylius-sylius)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[drupal/core

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

19462.3M1.3k](/packages/drupal-core)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)

PHPackages © 2026

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