PHPackages                             rysonliu/laravel-tree - 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. rysonliu/laravel-tree

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

rysonliu/laravel-tree
=====================

Tree generator

v2.1(1y ago)027MITPHP

Since May 12Pushed 1y agoCompare

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

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

Use guide
=========

[](#use-guide)

```
use Betterde\Tree\Generator;

$menus = [
    [
        'id' => 1,
        'parent_id' => 0,
        'label' => 'Dashboard',
        'link' => '/dashboard',
        'icon' => null,
        'roles' => 'Admin,'
    ],
    [
        'id' => 2,
        'parent_id' => 1,
        'label' => 'Fiance',
        'link' => '/dashboard/finace',
        'icon' => null,
        'roles' => 'Admin,Fiance'
    ],
    [
        'id' => 3,
        'parent_id' => 1,
        'label' => 'Operation',
        'link' => '/dashboard/operation',
        'icon' => null,
        'roles' => 'Admin,Operation'
    ],
];

$generator = new Generator();
$tree = $generator->make($menus, 'id', 'parent_id', 'sub_menus', 0);

```

Generated result
================

[](#generated-result)

```
[
    [
        'id' => 1,
        'parent_id' => 0,
        'label' => 'Dashboard',
        'link' => '/dashboard',
        'icon' => null,
        'roles' => 'Admin,',
        'sub_menus' => [
            [
                'id' => 2,
                'parent_id' => 1,
                'label' => 'Fiance',
                'link' => '/dashboard/finace',
                'icon' => null,
                'roles' => 'Admin,Fiance'
            ],
            [
                'id' => 3,
                'parent_id' => 1,
                'label' => 'Operation',
                'link' => '/dashboard/operation',
                'icon' => null,
                'roles' => 'Admin,Operation'
            ]
        ]
    ]
];
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% 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 ~338 days

Total

3

Last Release

418d ago

Major Versions

1.0 → v2.02023-11-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/783fdbc932bfd33d87589e1283ee211a362458c8077c81a7e03f6d606733f0f1?d=identicon)[rysonlau](/maintainers/rysonlau)

---

Top Contributors

[![jinrenjie](https://avatars.githubusercontent.com/u/5665135?v=4)](https://github.com/jinrenjie "jinrenjie (19 commits)")[![rysonliu](https://avatars.githubusercontent.com/u/55525541?v=4)](https://github.com/rysonliu "rysonliu (4 commits)")[![puzzle9](https://avatars.githubusercontent.com/u/13518196?v=4)](https://github.com/puzzle9 "puzzle9 (1 commits)")

---

Tags

generatortreenode

### Embed Badge

![Health badge](/badges/rysonliu-laravel-tree/health.svg)

```
[![Health](https://phpackages.com/badges/rysonliu-laravel-tree/health.svg)](https://phpackages.com/packages/rysonliu-laravel-tree)
```

###  Alternatives

[efureev/laravel-trees

Multi-Tree structures for Laravel

14253.3k4](/packages/efureev-laravel-trees)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[dcblogdev/laravel-module-generator

Generate Laravel Modules from a template.

7710.1k1](/packages/dcblogdev-laravel-module-generator)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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