PHPackages                             solution-forest/filament-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. solution-forest/filament-tree

ActiveLibrary

solution-forest/filament-tree
=============================

This is a tree layout plugin for Filament Admin

4.0.0(3mo ago)189267.5k—1.6%67[4 issues](https://github.com/solutionforest/filament-tree/issues)[1 PRs](https://github.com/solutionforest/filament-tree/pulls)10MITPHPPHP ^8.1CI passing

Since Apr 20Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/solutionforest/filament-tree)[ Packagist](https://packagist.org/packages/solution-forest/filament-tree)[ Docs](https://github.com/solution-forest/filament-tree)[ RSS](/packages/solution-forest-filament-tree/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (50)Used By (10)

Important

Please note that we will only be updating to version 4.x, excluding any bug fixes.

Filament Tree
=============

[](#filament-tree)

[![Latest Version on Packagist](https://camo.githubusercontent.com/16a1606e210323867434757e33255344050eda42cca2281fb16274a9dbae11e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6c7574696f6e2d666f726573742f66696c616d656e742d747265652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-tree)[![Total Downloads](https://camo.githubusercontent.com/e7fadb11517b2ad2b9136da30d694498b3c63ae8ee3e18d1cd45654ea932e75d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6c7574696f6e2d666f726573742f66696c616d656e742d747265652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-tree)

Filament Tree is a plugin for Filament Admin that creates hierarchical tree management with drag-and-drop functionality. Perfect for building menus, categories, organizational structures, and any nested data relationships.

**🎯 Key Features:**

- Drag-and-drop tree interface with unlimited depth
- Support for Widgets, Pages, and Resources
- Customizable actions, icons, and styling
- Translation support with Spatie Translatable
- Built-in create, edit, delete, and view actions
- Toolbar actions for global operations

**🚀 Demo:**
**Credentials:** `demo@solutionforest.net` / `12345678` (Auto-reset every hour)

Version Compatibility
---------------------

[](#version-compatibility)

Filament VersionPlugin Versionv32.x.xv43.x.xv54.x.xImportant

We only provide updates for versions 3.x, excluding bug fixes for older versions.

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

[](#installation)

1. **Install the package:**

    ```
    composer require solution-forest/filament-tree
    ```
2. **Publish and register assets:**

    ```
    php artisan filament:assets
    ```
3. **Publish configuration (optional):**

    ```
    php artisan vendor:publish --tag="filament-tree-config"
    ```
4. **For custom themes:** Add to your `tailwind.config.js`:

    ```
    @import '/solution-forest/filament-tree/resources/css/jquery.nestable.css';
    @import '/solution-forest/filament-tree/resources/css/button.css';
    @import '/solution-forest/filament-tree/resources/css/custom-nestable-item.css';
    @source '/solution-forest/filament-tree/resources/**/*.blade.php';
    ```

Quick Start
-----------

[](#quick-start)

### 1. Database Setup

[](#1-database-setup)

Create your migration with the required tree structure:

```
Schema::create('categories', function (Blueprint $table) {
    $table->id();
    $table->treeColumns(); // Adds parent_id, order, title columns
    $table->timestamps();
});

// Or manually:
Schema::create('categories', function (Blueprint $table) {
    $table->id();
    $table->integer('parent_id')->default(-1)->index(); // Must default to -1!
    $table->integer('order')->default(0);
    $table->string('title');
    $table->timestamps();
});
```

### 2. Model Setup

[](#2-model-setup)

Add the `ModelTree` trait to your Eloquent model:

```
