PHPackages                             pjedesigns/filament-nested-set-table - 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. pjedesigns/filament-nested-set-table

ActiveLibrary[Admin Panels](/categories/admin)

pjedesigns/filament-nested-set-table
====================================

A Filament table component for displaying and managing nested set data structures with drag-and-drop reordering support.

v1.1.3(2mo ago)1331[2 PRs](https://github.com/pjedesigns/filament-nested-set-table/pulls)MITPHPPHP ^8.2CI passing

Since Jan 20Pushed 2mo agoCompare

[ Source](https://github.com/pjedesigns/filament-nested-set-table)[ Packagist](https://packagist.org/packages/pjedesigns/filament-nested-set-table)[ Docs](https://github.com/pjedesigns/filament-nested-set-table)[ RSS](/packages/pjedesigns-filament-nested-set-table/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (30)Versions (7)Used By (0)

\# Filament Nested Set Table [![Latest Version on Packagist](https://camo.githubusercontent.com/84f9d0d014233aad4cd696deef8a32654e6d094abd48ecc089748e20a5b161e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706a6564657369676e732f66696c616d656e742d6e65737465642d7365742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pjedesigns/filament-nested-set-table)[![GitHub Tests Action Status](https://camo.githubusercontent.com/19cbcd5e38583ef110dab0c61bf028c8346b4079d098ca2c612faa7834e6be2f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706a6564657369676e732f66696c616d656e742d6e65737465642d7365742d7461626c652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/pjedesigns/filament-nested-set-table/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/07babaf55565abae76c2d7bb3c888cc06c997a71bb62d2936b59bc1446047195/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706a6564657369676e732f66696c616d656e742d6e65737465642d7365742d7461626c652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/pjedesigns/filament-nested-set-table/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/65df937de1a033795a8dc6fe7efb71e774020a6fca03f0b4fbe6e6a7c66bab77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706a6564657369676e732f66696c616d656e742d6e65737465642d7365742d7461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pjedesigns/filament-nested-set-table)

A Filament table component for displaying and managing nested set data structures with drag-and-drop reordering support. Works with Filament v4/v5. Built for use with [kalnoy/nestedset](https://github.com/lazychaser/laravel-nestedset).

Features
--------

[](#features)

- **Two Display Modes**: Standard Filament table with tree features OR dedicated ordering page
- **Drag-and-Drop Reordering**: Intuitive touch-friendly drag-and-drop with visual drop zones
- **Nested Set Integration**: Works seamlessly with `kalnoy/nestedset` package
- **Tree-Aware Actions**: Delete, force-delete, and restore actions that show descendant counts
- **Expand/Collapse**: Toggle visibility of child nodes with session persistence
- **Lazy Loading**: Only loads visible nodes for better performance with large trees (HasTree)
- **Eager Loading Support**: Configure relationships to eager load with tree queries
- **Smart Pagination**: Pagination counts root nodes only, children are loaded on expand
- **Scoped Trees**: Supports scoped nested sets (e.g., navigation items by navigation\_id)
- **Authorization**: Integrates with model policies for move permission checks
- **Alphabetical Ordering**: One-click alphabetical sort with multi-field support
- **Undo Support**: Temporary undo button for accidental moves
- **Dark Mode**: Full Filament dark mode support

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 12+
- Filament v4/v5
- kalnoy/nestedset 6.0+

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

[](#installation)

Install the package via composer:

```
composer require pjedesigns/filament-nested-set-table
```

Publish the config file (optional):

```
php artisan vendor:publish --tag="filament-nested-set-table-config"
```

Usage Options
-------------

[](#usage-options)

This package provides two ways to display and manage nested set data:

FeatureHasTree (Table)OrderPage (Dedicated)Use caseFull CRUD with treeFocused reorderingLoadingLazy (on expand)All at onceExpand/CollapseServer callPure JavaScriptColumns/ActionsFull Filament supportLabel onlyBest forData managementQuick reordering---

Option 1: HasTree Trait (Table Integration)
-------------------------------------------

[](#option-1-hastree-trait-table-integration)

Best for: Full CRUD functionality with tree visualization in standard Filament tables.

### 1. Prepare Your Model

[](#1-prepare-your-model)

Ensure your model uses the `NodeTrait` from kalnoy/nestedset and optionally add the `InteractsWithTree` trait:

```
