PHPackages                             amsoell/laravel-collection-normalize-keys - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. amsoell/laravel-collection-normalize-keys

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

amsoell/laravel-collection-normalize-keys
=========================================

Laravel collection macro to ensure consistent keys within a multidimensional collection

v1.0(8y ago)018MITPHPPHP &gt;=5.6

Since Mar 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/amsoell/laravel-collection-normalize-keys)[ Packagist](https://packagist.org/packages/amsoell/laravel-collection-normalize-keys)[ RSS](/packages/amsoell-laravel-collection-normalize-keys/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel normalizeKeys collection method
=======================================

[](#laravel-normalizekeys-collection-method)

Ensure that every array / collection within a collection contains the same keys

```
$collection = collect([
  [ 'a' => 1, 'b' => 2],
  [ 'a' => 1, 'c' => 3],
  [ 'b' => 1, 'c' => 3],
]);

$collection->normalizeKeys();

// [
//     [ 'a' => 1, 'b' => 2, 'c' => null ],
//     [ 'a' => 1, 'b' => null, 'c' => 3 ],
//     [ 'a' => null, 'b' => 1, 'c' => 3 ],
// ];
```

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

[](#installation)

`composer require amsoell/laravel-collection-normalize-keys`

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3031d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/187129?v=4)[Andy Soell](/maintainers/amsoell)[@amsoell](https://github.com/amsoell)

---

Top Contributors

[![amsoell](https://avatars.githubusercontent.com/u/187129?v=4)](https://github.com/amsoell "amsoell (1 commits)")

---

Tags

phplaravelcollectionmacromacros

### Embed Badge

![Health badge](/badges/amsoell-laravel-collection-normalize-keys/health.svg)

```
[![Health](https://phpackages.com/badges/amsoell-laravel-collection-normalize-keys/health.svg)](https://phpackages.com/packages/amsoell-laravel-collection-normalize-keys)
```

###  Alternatives

[werxe/laravel-collection-macros

Custom Laravel Collection macros.

2626.6k](/packages/werxe-laravel-collection-macros)[lazerg/laravel-enum-pro

A powerful PHP enum extension with collection support, random selection, and magic static calls

4319.5k](/packages/lazerg-laravel-enum-pro)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2518.6k](/packages/iteks-laravel-enum)[appstract/laravel-response-macros

Extra Response Macro's for Laravel

321.5k](/packages/appstract-laravel-response-macros)[jshannon63/jsoncollect

Supercharge your JSON using collections

155.0k1](/packages/jshannon63-jsoncollect)

PHPackages © 2026

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