PHPackages                             designmynight/laravel-recursive-collection - 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. designmynight/laravel-recursive-collection

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

designmynight/laravel-recursive-collection
==========================================

A package to convert nested arrays and associative arrays into nested collections

v2.0.0(2y ago)822.7k↓29.5%2MITPHP

Since Feb 1Pushed 2y ago4 watchersCompare

[ Source](https://github.com/designmynight/laravel-recursive-collection)[ Packagist](https://packagist.org/packages/designmynight/laravel-recursive-collection)[ Docs](https://github.com/designmynight/laravel-recursive-collection)[ RSS](/packages/designmynight-laravel-recursive-collection/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Recursive Collection
============================

[](#laravel-recursive-collection)

[![Latest Stable Version](https://camo.githubusercontent.com/37c1a58d9f96249df5ab9b7e889448a42ff601e0a38c458578f492180af0f335/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f64657369676e6d796e696768742f6c61726176656c2d7265637572736976652d636f6c6c656374696f6e2e737667)](https://packagist.org/packages/designmynight/laravel-recursive-collection) [![Total Downloads](https://camo.githubusercontent.com/9f57348a189cf9b18112fb2dcaf2093fc0bc56fa5694ddb91389c39e51152f1c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f64657369676e6d796e696768742f6c61726176656c2d7265637572736976652d636f6c6c656374696f6e2e737667)](https://packagist.org/packages/designmynight/laravel-recursive-collection)

A service provider to add support for for converting nested arrays and associative arrays into laravel collections

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Example](#example)

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

[](#installation)

Installation using composer:

```
composer require designmynight/laravel-recursive-collection
```

### Laravel version Compatibility

[](#laravel-version-compatibility)

LaravelPackage5.5.x1.0.xAnd add the service provider in `config/app.php`:

```
DesignMyNight\Laravel\RecursiveCollectionServiceProvider::class,
```

For usage with [Lumen](http://lumen.laravel.com), add the service provider in `bootstrap/app.php`.

```
$app->register(DesignMyNight\Laravel\RecursiveCollectionServiceProvider::class);
```

Example
-------

[](#example)

```
$data = [
    [
        'name' => 'John Doe',
        'email' => 'john@doe.com',
        'bookings' => [
            [
                'venue' => 'Venue A',
                'date' => '2000-01-01'
                'guests' => 2
            ],
            [
                'venue' => 'Venue B',
                'date' => '2001-01-01'
                'guests' => 2
            ],
        ],
    ],
];

$collection = (new Collection($data))->recursive();
$collection = collect($data)->recursive(); // Shorthand
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~2099 days

Total

2

Last Release

929d ago

Major Versions

v1.0.0 → v2.0.02023-11-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6871504?v=4)[Dan](/maintainers/danjohnson95)[@danjohnson95](https://github.com/danjohnson95)

![](https://avatars.githubusercontent.com/u/12199424?v=4)[Steve Porter](/maintainers/StevePorter92)[@StevePorter92](https://github.com/StevePorter92)

![](https://avatars.githubusercontent.com/u/465569?v=4)[Will Taylor-Jackson](/maintainers/willtj)[@willtj](https://github.com/willtj)

![](https://avatars.githubusercontent.com/u/9197954?v=4)[James](/maintainers/jmosul)[@jmosul](https://github.com/jmosul)

![](https://avatars.githubusercontent.com/u/1786811?v=4)[Ally](/maintainers/alasdairmackenzie)[@alasdairmackenzie](https://github.com/alasdairmackenzie)

---

Top Contributors

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

---

Tags

collectiondesignmynightlaravellaravel-collectionlaravel-recursive-collectionotherlaravelcollectiondesignmynightlaravel-collectionlaravel-recursive-collection

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/designmynight-laravel-recursive-collection/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[lazerg/laravel-enum-pro

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

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

Custom Laravel Collection macros.

2625.8k](/packages/werxe-laravel-collection-macros)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[prologue/support

Prologue Support is an extension for Illuminate Support

1616.8k](/packages/prologue-support)

PHPackages © 2026

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