antwerpes/filament-nested-set-order

Filament plugin for ordering resources stored using the nested set model
528 3
Install
composer require antwerpes/filament-nested-set-order
Latest Version:1.3.0
PHP:^8.1
License:MIT
Last Updated:Apr 20, 2026
Links: GitHub  ·  Packagist
Maintainer: chiiya

Filament Nested Set Order

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

Filament actions for ordering resources that use kalnoy/nestedset.

Installation

composer require antwerpes/filament-nested-set-order

Usage

  1. Ensure your models use the Kalnoy\Nestedset\NodeTrait and Antwerpes\FilamentNestedSetOrder\Orderable traits.
class Category extends Model
{
    use NodeTrait;
    use Orderable;
}
  1. Add the actions to your filament resource and specify the query order:
use Antwerpes\FilamentNestedSetOrder\NestedSetOrderActions;

class CategoryResource extends Resource
{
    public static function table(Table $table): Table
    {
        return $table->prependActions(NestedSetOrderActions::make());
    }
    
    public static function getEloquentQuery(): Builder
    {
        return parent::getEloquentQuery()->withDepth()->defaultOrder();
    }
}

Caching

To improve performance you may enable caching:

  1. Publish the config file:
php artisan vendor:publish --tag="filament-nested-set-order-config"
  1. Enable caching:
return [
    'cache_enabled' => true,
];

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Leave an issue on GitHub, or create a Pull Request.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

novius/filament-relation-nested

A filament package to manage relationships that use the NestedSet model.

679 2
wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and...

8,856 21
bikmazer/laravel-nestable

Laravel 5 nested categories library

10 2
ozankurt/modules-blog

Ready to use blog module for laravel.

84 8