antwerpes/filament-nested-set-order 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

antwerpes/filament-nested-set-order

最新稳定版本:1.3.0

Composer 安装命令:

composer require antwerpes/filament-nested-set-order

包简介

Filament plugin for ordering resources stored using the nested set model

README 文档

README

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.

统计信息

  • 总下载量: 387
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固