PHPackages                             webfactor/laravel-backpack-nestedmodels - 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. webfactor/laravel-backpack-nestedmodels

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

webfactor/laravel-backpack-nestedmodels
=======================================

Intuitively create model trees with Laravel Backpack CRUD

v1.0.0(8y ago)0147[2 issues](https://github.com/webfactor/laravel-backpack-nestedmodels/issues)MITHTMLCI failing

Since Feb 3Pushed 6y ago2 watchersCompare

[ Source](https://github.com/webfactor/laravel-backpack-nestedmodels)[ Packagist](https://packagist.org/packages/webfactor/laravel-backpack-nestedmodels)[ Docs](https://github.com/webfactor/laravel-backpack-nestedmodels)[ RSS](/packages/webfactor-laravel-backpack-nestedmodels/feed)WikiDiscussions master Synced 1w ago

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

> Attention: This Package is for Laravel Backpack v3 only. There are no plans to make it compatible with v4.

LaravelBackpackNestedmodels
===========================

[](#laravelbackpacknestedmodels)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0f0c4d95e5f215cf949e6aaf24d3954f23d3f195f410a42a8fb24b84b81be8f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776562666163746f722f6c61726176656c2d6261636b7061636b2d6e65737465646d6f64656c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webfactor/laravel-backpack-nestedmodels)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/05202dfe279ca9b44d22d1ea5856bdeb9b55031ad1a0c56732eaa1b23a448e5a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f776562666163746f722f6c61726176656c2d6261636b7061636b2d6e65737465646d6f64656c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/webfactor/laravel-backpack-nestedmodels)[![Coverage Status](https://camo.githubusercontent.com/245e7e184011cb392c5c6b9e6ed369ab0bcc2afd41bb2b64c1b712326e80fa7f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f776562666163746f722f6c61726176656c2d6261636b7061636b2d6e65737465646d6f64656c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/webfactor/laravel-backpack-nestedmodels/code-structure)[![Quality Score](https://camo.githubusercontent.com/a6f6d2f882a46b96b9fbbb76d60adb32e4018dd7ec18d864d430171357e3fc86/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f776562666163746f722f6c61726176656c2d6261636b7061636b2d6e65737465646d6f64656c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/webfactor/laravel-backpack-nestedmodels)[![Total Downloads](https://camo.githubusercontent.com/63fc27b3fa6a6625549f83831f7489d526820e9016015cb43e6989c691dafd09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776562666163746f722f6c61726176656c2d6261636b7061636b2d6e65737465646d6f64656c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webfactor/laravel-backpack-nestedmodels)

Intuitively create tree structured models in your Backpack CRUD admin panel.

Install
-------

[](#install)

Via Composer

```
$ composer require webfactor/laravel-backpack-nestedmodels
```

Usage
-----

[](#usage)

If you want to easily and intuitively manage your nested models with Backpack CRUD you just need to do the following:

- Create your models migration. You can use the macro `$table->tree()` to get all necessary columns to work with [kalnoy/laravel-nestedset](https://github.com/lazychaser/laravel-nestedset) and this package.
- Create your BackpackCRUD controllers and models as documented in [backpack/CRUD](https://github.com/Laravel-Backpack/CRUD)In most cases this is just running `php artisan backpack:crud` after creating the model migration.
- Be sure your model uses `NestedModelTrait`
- Let your CrudController extend `Webfactor\Laravel\Backpack\NestedModels\Controllers\NestedModelsCrudController` instead of BaseCrudController
- Call `$this->treeSetup()` in your `setup` function **after** setting the crud model.

That's all. You are ready to see your tree structure in action. Just navigate to the appropriate route.

Customization
-------------

[](#customization)

You can run

```
$ php artisan vendor:publish --provider="Webfactor\Laravel\Backpack\NestedModels\NestedModelsServiceProvider"
```

to publish all views and edit them in 'resources/views/vendor/webfactor/nestedmodels' to customize the look and feel.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Oliver Ziegler](https://github.com/OliverZiegler)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

3026d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c9a2c2e97d66bd30df7df75183059e218e21ee5d5b80cdcf6542d1a2c60992d?d=identicon)[OliverZiegler](/maintainers/OliverZiegler)

![](https://www.gravatar.com/avatar/d1f7e53fc33bd0893449f12d5b1d178f5a4b4ac8f41db4031c7b7291f565095a?d=identicon)[webfactor](/maintainers/webfactor)

---

Top Contributors

[![OliverZiegler](https://avatars.githubusercontent.com/u/7778510?v=4)](https://github.com/OliverZiegler "OliverZiegler (2 commits)")[![tswonke](https://avatars.githubusercontent.com/u/6401044?v=4)](https://github.com/tswonke "tswonke (1 commits)")

---

Tags

laraveleloquentmodelsnested-setbackpackWebfactormodel tree

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/webfactor-laravel-backpack-nestedmodels/health.svg)

```
[![Health](https://phpackages.com/badges/webfactor-laravel-backpack-nestedmodels/health.svg)](https://phpackages.com/packages/webfactor-laravel-backpack-nestedmodels)
```

###  Alternatives

[rinvex/laravel-categories

Rinvex Categories is a polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.

470161.6k3](/packages/rinvex-laravel-categories)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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