PHPackages                             ngoubaux/delatbabel-nestedcategories - 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. [Database &amp; ORM](/categories/database)
4. /
5. ngoubaux/delatbabel-nestedcategories

ActiveLibrary[Database &amp; ORM](/categories/database)

ngoubaux/delatbabel-nestedcategories
====================================

A Laravel 5 package for nested categories.

v11.0(1y ago)081MITPHPPHP ^8.0

Since Oct 30Pushed 1y agoCompare

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

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

nestedcategories
================

[](#nestedcategories)

[![StyleCI](https://camo.githubusercontent.com/0c9f2e6f0fbe4367dac1145dff047a7b3615fc6c14721069d5566d892d2ac04f/68747470733a2f2f7374796c6563692e696f2f7265706f732f35303839323630362f736869656c64)](https://styleci.io/repos/50892606)[![Latest Stable Version](https://camo.githubusercontent.com/ca4983cdff2cce00b43fb880b94c8d32faa2d0a6888ed98a96ef6e1e6867dab3/68747470733a2f2f706f7365722e707567782e6f72672f64656c6174626162656c2f6e657374656463617465676f726965732f76657273696f6e2e706e67)](https://packagist.org/packages/ddpro/nestedcategories)[![Total Downloads](https://camo.githubusercontent.com/9fabc434245ecc398aa7f2df0aaf37a583febee1bae63027d6175fc310b8ee85/68747470733a2f2f706f7365722e707567782e6f72672f64656c6174626162656c2f6e657374656463617465676f726965732f642f746f74616c2e706e67)](https://packagist.org/packages/delatbabel/nestedcategories)

A Laravel 5 package for adding one or more types of category hierarchy to a website.

e.g. a hierarchy for blog categories and another for product categories

This is a Laravel 5 reimplementation of [Laravel 4 Categories](https://github.com/FbF/Laravel-Categories)

Comes with
----------

[](#comes-with)

- Migration for the `categories` table
- Category Model (that extends Baum/Node so you can use all the handy methods from this excellent nested set implementation)
- Seed for building the root nodes, one for each type of hierarchy, specified in your config file

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

[](#installation)

Add these lines to your composer.json file:

```
    "require": {
        "delatbabel/nestedcategories": "~1.0"
    },

```

Once that is done, run the composer update command:

```
    composer update

```

Alternatively just run this command:

```
    composer require delatbabel/nestedcategories

```

### Register Service Provider

[](#register-service-provider)

After composer update completes, add this line to your config/app.php file in the 'providers' array:

```
    Delatbabel\NestedCategories\NestedCategoriesServiceProvider::class

```

### Publish the Migrations

[](#publish-the-migrations)

Publish the migrations

```
    php artisan vendor:publish

```

Run the migration

```
    php artisan migrate

```

Ensure the categories `types` are set correctly in the seeder file. You can initialise this to whatever you like.

### Run the Seeders

[](#run-the-seeders)

Run the seed (this will create root nodes for each of your category `types`)

```
    php artisan db:seed --class="CategoriesTableBaseArraySeeder"

```

You may prefer to build your own **CategoriesTableSeeder** class based on the code in **CategoriesTableBaseArraySeeder** to seed your own initial set of categories.

Usage
=====

[](#usage)

This class relies on the behind-the-scenes capabilities of Baum. For details on the use of that see the [README on github](https://github.com/etrepat/baum) or the [Baum web site](http://etrepat.com/baum/)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86% 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

557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c18315a6809d3940f1277ddebaf7e1931553b5aacb67be0a2d0a3306962bbc1?d=identicon)[ngoubaux](/maintainers/ngoubaux)

---

Top Contributors

[![delatbabel](https://avatars.githubusercontent.com/u/2335362?v=4)](https://github.com/delatbabel "delatbabel (37 commits)")[![haidangibm](https://avatars.githubusercontent.com/u/6229550?v=4)](https://github.com/haidangibm "haidangibm (6 commits)")

---

Tags

laraveleloquentl5laravel5categoriesheirarchy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ngoubaux-delatbabel-nestedcategories/health.svg)

```
[![Health](https://phpackages.com/badges/ngoubaux-delatbabel-nestedcategories/health.svg)](https://phpackages.com/packages/ngoubaux-delatbabel-nestedcategories)
```

###  Alternatives

[delatbabel/elocryptfive

Automatically encrypt and decrypt Eloquent attributes with ease.

8493.0k](/packages/delatbabel-elocryptfive)[rutorika/sortable

Adds sortable behavior and ordering to Laravel Eloquent models. Grouping and many to many supported.

299992.5k14](/packages/rutorika-sortable)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[dolphiq/laravel-aescrypt

AES encrypt and decrypt Eloquent attributes inspired by elocryptfive

171.7k](/packages/dolphiq-laravel-aescrypt)[lacodix/laravel-model-filter

A Laravel package to filter, search and sort models with ease while fetching from database.

17649.9k](/packages/lacodix-laravel-model-filter)

PHPackages © 2026

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