PHPackages                             ayoub-amzil/header-harmony - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ayoub-amzil/header-harmony

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ayoub-amzil/header-harmony
==========================

Reusable API header profiles for Laravel apps

1.0.0(11mo ago)014MITPHPPHP ^8.0

Since Jul 18Pushed 11mo agoCompare

[ Source](https://github.com/ayoub-amzil/header-harmony)[ Packagist](https://packagist.org/packages/ayoub-amzil/header-harmony)[ RSS](/packages/ayoub-amzil-header-harmony/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Header Harmony for Laravel
==========================

[](#header-harmony-for-laravel)

A lightweight Laravel package that helps you manage, organize, and retrieve custom HTTP headers using Laravel's configuration and .env setup for third-party API requests, whether for development or production. Instead of hardcoding headers in each request, centralize them in configuration and access them with a clean, simple interface.

Features
--------

[](#features)

- Clean separation of logic and configuration.
- Supports .env dynamic values (secure for production use).
- Compatible with Laravel 12.x and PHP 8.0+.
- Can be used with Laravel's HTTP client or Guzzle.
- Ready for development and production use.

Requirements
------------

[](#requirements)

- Laravel 10 / 11 / 12
- PHP 8.0+

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

[](#installation)

### 1. Require the package via Composer

[](#1-require-the-package-via-composer)

```
composer require ayoub-amzil/header-harmony
```

### 2. Publish the configuration file

[](#2-publish-the-configuration-file)

```
php artisan vendor:publish --tag=header-harmony-config
```

This will publish the config file to: `config/header-harmony.php`

Usage/Examples
--------------

[](#usageexamples)

### 1. Define services and headers in the config file

[](#1-define-services-and-headers-in-the-config-file)

Edit the `config/header-harmony.php` file:

```
'openai' => [
    'Authorization' => 'Bearer ' . env('OPENAI_KEY'),
    'Content-Type' => 'application/json',
],
'coinmarketcap' => [
    'X-CMC_PRO_API_KEY' => env('COINMARKETCAP_KEY'),
    'Accept' => 'application/json',
],
'weatherapi' => [
    'key' => env('WEATHER_API_KEY'),
    'Accept' => 'application/json',
],
'test' => [
    'Authorization' => env('TEST'),
    'Content-Type' => 'application/json',
],
```

### 2. Add your API keys to the .env file

[](#2-add-your-api-keys-to-the-env-file)

```
OPENAI_KEY=sk-xxxxx
COINMARKETCAP_KEY=ghp_xxxxxx
WEATHER_API_KEY=abc123
TEST=####
```

### 3. You're now ready to use the package!

[](#3-youre-now-ready-to-use-the-package)

Use it anywhere in your Laravel app like:

```
use HeaderHarmony\HeaderHarmony;

$headers = HeaderHarmony::for('openai');
```

Error Handling
--------------

[](#error-handling)

The `for($service)` method will throw an exception if:

- The service name is not defined in `config/header-harmony.php`

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance50

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

350d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68514362?v=4)[Amzil Ayoub](/maintainers/amzil-ayoub)[@amzil-ayoub](https://github.com/amzil-ayoub)

---

Top Contributors

[![ayoub-amzil](https://avatars.githubusercontent.com/u/85901966?v=4)](https://github.com/ayoub-amzil "ayoub-amzil (1 commits)")

---

Tags

apiauthenticationcomposerheaderslaravelpackagephp

### Embed Badge

![Health badge](/badges/ayoub-amzil-header-harmony/health.svg)

```
[![Health](https://phpackages.com/badges/ayoub-amzil-header-harmony/health.svg)](https://phpackages.com/packages/ayoub-amzil-header-harmony)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[althinect/filament-spatie-roles-permissions

3481.1M10](/packages/althinect-filament-spatie-roles-permissions)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.0k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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