PHPackages                             cube-agency/filament-tree-view - 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. cube-agency/filament-tree-view

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

cube-agency/filament-tree-view
==============================

Filament package to view records in tree view

v3.0.0(1mo ago)52.8k↓77.2%3[1 issues](https://github.com/cube-agency/filament-tree-view/issues)[1 PRs](https://github.com/cube-agency/filament-tree-view/pulls)1MITPHPPHP ^8.2

Since Jan 3Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/cube-agency/filament-tree-view)[ Packagist](https://packagist.org/packages/cube-agency/filament-tree-view)[ Docs](https://github.com/cube-agency/filament-tree-view)[ RSS](/packages/cube-agency-filament-tree-view/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (20)Versions (32)Used By (1)

Tree View for Filament
======================

[](#tree-view-for-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3a19a3736041f28f5f91bdb2449390c0508c0e9700228f927634543f84eddcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637562652d6167656e63792f66696c616d656e742d747265652d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cube-agency/filament-tree-view)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9dd86ae905f95ac9e84785796bdc955b1c4619096e5aadc8850307f074fff3fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637562652d6167656e63792f66696c616d656e742d747265652d766965772f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cube-agency/filament-tree-view/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/650d917e182c85735c29596e3ae74f1c14cd0b6b350212d256b997a8d9afb2d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637562652d6167656e63792f66696c616d656e742d747265652d766965772f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/cube-agency/filament-tree-view/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0c828cd69a6a8e32ef4436dbca4a4c6dfd9321c8f578c68ebc08d788fc06904c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637562652d6167656e63792f66696c616d656e742d747265652d766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cube-agency/filament-tree-view)

Filament plugin for showing records in Tree view.

Compatibility
-------------

[](#compatibility)

Package VersionFilament Version1.x3.x2.x4.x3.x4.x, 5.xInstallation
------------

[](#installation)

You can install the package via composer:

```
composer require cube-agency/filament-tree-view
```

Configuration
-------------

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-tree-view-config"
```

Available Configuration Options
-------------------------------

[](#available-configuration-options)

- **max\_depth**: Controls the maximum nesting level of the tree view.
- **compact**: When set to true, the tree view will be displayed in a compact format. This is useful for displaying large trees with many nodes.
- **has\_permissions**: When set to true, actions will check user permissions before allowing them. If set to false, actions will be available to all users.
- **has\_user\_only\_policy**: When set to true, resource-specific permissions are ignored and only user permissions are checked improving performance.

Usage
-----

[](#usage)

This package uses [NestedSet](https://github.com/lazychaser/laravel-nestedset), you should setup your Model/table according to the readme.

Then add trait to your model

```
