PHPackages                             alisaleem/nova-nested-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. [Admin Panels](/categories/admin)
4. /
5. alisaleem/nova-nested-tree

ActiveLibrary[Admin Panels](/categories/admin)

alisaleem/nova-nested-tree
==========================

Nova vue-tree-select field for management nested category relations.

v1.0.1(1y ago)13851MITPHPPHP ^8.0

Since Jun 12Pushed 1y agoCompare

[ Source](https://github.com/alisaleem27/nova-nested-tree)[ Packagist](https://packagist.org/packages/alisaleem/nova-nested-tree)[ RSS](/packages/alisaleem-nova-nested-tree/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Nova Nested Tree Attach Many
============================

[](#nova-nested-tree-attach-many)

Support Laravel nova 4. for nova 3 , use [this package](https://github.com/phoenix-lib/nova-nested-tree-attach-many).

### Suppot:

[](#suppot)

Belongs To Many Field for simple manage Nested relation tree. Enables attaching relationships easily.

[![nova-nested-tree-attach-many](https://user-images.githubusercontent.com/74270064/98738291-8a872780-23b8-11eb-8c76-a8605abe69f8.gif)](https://user-images.githubusercontent.com/74270064/98738291-8a872780-23b8-11eb-8c76-a8605abe69f8.gif)

### RoadMap

[](#roadmap)

- Validation
- Show selected categories on Detail
- Ability to pass your own tree
- Ability to `Delayed Loading` data when tree has many records ( example 10k+ ).

### Installation

[](#installation)

```
composer require zakariatlilani/nova-nested-tree
```

### Usage

[](#usage)

This field uses tree provided by kalnoy/nestedset package

This field uses riophae/vue-treeselect under the hood

```
use zakariatlilani\NovaNestedTree\NestedTreeAttachManyField;
```

```
public function fields(Request $request)
{
    return [
        NestedTreeAttachManyField::make('Offer Categories',"categories","App\Nova\Category"),
    ];
}
```

Your model should has NodeTrait form package kalnoy/nestedset see RoadMap

```
class Category extends Model
{
    use NodeTrait;
}
```

### Options

[](#options)

Here are a few customization options

- `->searchable(bool $searchable)`
- `->withIdKey(string $idKey = 'id')` // - id column name in your nested model
- `->withLabelKey(string $labelKey = 'name')` // - label column name in your nested model
- `->withActiveKey(string $activeKey)` // - active\_status column name in your nested model used for disable options
- `->withChildrenKey(string $childrenKey)` // - children key in your nested model
- `->withPlaceholder(string $placeholder)` // - placeholder in tree select
- `->withMaxHeight(int $maxHeight)`
- `->withSortValueBy(string $sortBy)` // - @see
- `->withAlwaysOpen(bool $alwaysOpen)` // - by default select is open, but you can change it behavior
- `->withFlatten(bool $flatten)` // - by default flatten is enabled, but you can change it behavior
- `->useSingleSelect()` // - ability for select only one value
- `->useAsField()` // - ability to write result to field without relations

### Example of use with package whitecube/nova-flexible-content

[](#example-of-use-with-package-whitecubenova-flexible-content)

```
use Whitecube\NovaFlexibleContent\Flexible;
use zakariatlilani\NovaNestedTree\NestedTreeAttachManyField;

/**
 * Get the fields displayed by the resource.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return array
 */
public function fields(Request $request)
{
    return [
        // ...

        Flexible::make('Content')
            ->addLayout('Simple content section', 'tree_section', [
                NestedTreeAttachManyField::make('Tree',"tree","App\Nova\Category")
                    ->useAsField(),
            ])
    ];
}
```

### Authorization

[](#authorization)

This field also respects policies: ie Role / Permission

- RolePolicy: attachAnyPermission($user, $role)
- RolePolicy: attachPermission($user, $role, $permission)
- PermissionPolicy: viewAny($user)

### Validation

[](#validation)

You can set min, max, size, required or custom rule objects

```
->rules('min:5', 'max:10', 'size:10', 'required', new CustomRule)`
```

### Contributing

[](#contributing)

Feel free to suggest changes, ask for new features or fix bugs yourself.

Hope this package will be useful for you.

### credit

[](#credit)

[phoenix-lib](https://github.com/phoenix-lib/nova-nested-tree-attach-many)

---

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance48

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Every ~0 days

Total

2

Last Release

387d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7361774?v=4)[alisaleem](/maintainers/alisaleem)[@AliSaleem](https://github.com/AliSaleem)

---

Top Contributors

[![alisaleem27](https://avatars.githubusercontent.com/u/28596110?v=4)](https://github.com/alisaleem27 "alisaleem27 (2 commits)")

---

Tags

laravelnested setsnovabelongs-to-many

### Embed Badge

![Health badge](/badges/alisaleem-nova-nested-tree/health.svg)

```
[![Health](https://phpackages.com/badges/alisaleem-nova-nested-tree/health.svg)](https://phpackages.com/packages/alisaleem-nova-nested-tree)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[phoenix-lib/nova-nested-tree-attach-many

Nova vue-tree-select field for management nested category relations.

3591.5k](/packages/phoenix-lib-nova-nested-tree-attach-many)[david-griffiths/nova-dark-theme

A dark theme for Laravel Nova

71600.0k](/packages/david-griffiths-nova-dark-theme)[pdmfc/nova-action-button

A Laravel Nova field to run actions.

37753.3k1](/packages/pdmfc-nova-action-button)[khalin/nova-link-field

A Laravel Nova Link field.

31587.5k2](/packages/khalin-nova-link-field)

PHPackages © 2026

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