PHPackages                             aiman/nest-tool - 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. aiman/nest-tool

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

aiman/nest-tool
===============

A Laravel Nova resource tool.

v1.0.0(5y ago)22.1k6[1 PRs](https://github.com/aiman1717a/nest-tool/pulls)MITPHPPHP &gt;=7.1.0

Since Jun 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/aiman1717a/nest-tool)[ Packagist](https://packagist.org/packages/aiman/nest-tool)[ RSS](/packages/aiman-nest-tool/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Nest Tool
=========

[](#nest-tool)

This Nova Package allow you to nest items in hierarchy level.

[![image](https://user-images.githubusercontent.com/36910126/84803777-4afa1200-afb7-11ea-9094-b1281a859cf1.png)](https://user-images.githubusercontent.com/36910126/84803777-4afa1200-afb7-11ea-9094-b1281a859cf1.png)

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

[](#installation)

```
composer require aiman/nest-tool

```

Example Migration Schema
------------------------

[](#example-migration-schema)

```
class CreateTopicsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('topics', function (Blueprint $table) {
            $table->id();
            $table->text('topic');
            $table->text('slug')->nullable();
            $table->integer('order')->default(1);
            $table->integer('parent_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('topics');
    }
}

```

Usage
-----

[](#usage)

In order to use the nest tool, it requires a model to use which includes a order column, parent column, amd the display name to be shown in each item. Example is shown above

```
use Aiman\ThaanaTextField\ThaanaTextField;

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

            //other fields

            NestTool::make()
             ->usingModel(\App\Models\Topic::class)
             ->slug('slug')
             ->orderColumn('order')
             ->parentColumn('parent_id')
             ->displayName('topic')
             ->disable(false)
        ];
    }

```

Relationship
------------

[](#relationship)

the model which is entered into `usingModel()` function should have this relationship

```
function parent(){
    return $this->belongsTo('App\Models\Topic', 'parent_id');
}

function children(){
    return $this->hasMany(self::class, 'parent_id')->orderBy('order')->with('children');
}

```

### Model

[](#model)

This function requires the model in which nest tool uses

```
NestTool::make()->usingModel(\App\Models\Topic::class)

```

### Slug

[](#slug)

This function requires the slug field to be displayed. By default it is `slug`

```
NestTool::make()->slug('slug')

```

### Order

[](#order)

This function requires the order column name in the model class above which is used for ordering. By default it is `order`

```
NestTool::make()->orderColumn('order')

```

### Parent Id

[](#parent-id)

This function requires the parent column name in the model class above which is used for nesting items under a parent item. By default it is `parent_id`

```
NestTool::make()->parentColumn('parent_id')

```

### Topic

[](#topic)

This function requires the display name's column name in the model class above which is used to display in each item. By default it is `topic`

```
NestTool::make()->displayName('topic')

```

Important
---------

[](#important)

This package is tested for **nova 2.0+**Latest tested on **nova v3.6.0**

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/244a34aca62dea610391ed8ca5aa91cafa48f101babbe7c38dc6c1aa3701a6b9?d=identicon)[aiman1717a](/maintainers/aiman1717a)

---

Top Contributors

[![aiman1717a](https://avatars.githubusercontent.com/u/36910126?v=4)](https://github.com/aiman1717a "aiman1717a (12 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/aiman-nest-tool/health.svg)

```
[![Health](https://phpackages.com/badges/aiman-nest-tool/health.svg)](https://phpackages.com/packages/aiman-nest-tool)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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