cube-agency/filament-tree-view
Composer 安装命令:
composer require cube-agency/filament-tree-view
包简介
Filament package to view records in tree view
README 文档
README
Filament plugin for showing records in Tree view.
Compatibility
| Package Version | Filament Version |
|---|---|
| 1.x | 3.x |
| 2.x | 4.x |
| 3.x | 4.x, 5.x |
Installation
You can install the package via composer:
composer require cube-agency/filament-tree-view
Configuration
You can publish the config file with:
php artisan vendor:publish --tag="filament-tree-view-config"
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
This package uses NestedSet, you should setup your Model/table according to the readme.
Then add trait to your model
<?php namespace App\Models; use CubeAgency\FilamentTreeView\Traits\HasTreeView; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Kalnoy\Nestedset\NodeTrait; class ForumCategory extends Model { use HasTreeView; }
After that you just need to extend ListRecords and CreateRecord pages to use TreeViewRecords and CreateTreeViewRecord respectively
namespace App\Filament\Resources\ForumCategoryResource\Pages; use App\Filament\Resources\ForumCategoryResource; use CubeAgency\FilamentTreeView\Resources\Pages\TreeViewRecords; class ListForumCategories extends TreeViewRecords { protected static string $resource = ForumCategoryResource::class; }
After that you just need to extend CreateRecord resource to use CreateTreeViewRecord
namespace App\Filament\Resources\ForumCategoryResource\Pages; use App\Filament\Resources\ForumCategoryResource; use CubeAgency\FilamentTreeView\Resources\Pages\CreateTreeViewRecord; class CreateForumCategory extends CreateTreeViewRecord { protected static string $resource = ForumCategoryResource::class; }
and that's it, you are ready to go.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
cube-agency/filament-tree-view 适用场景与选型建议
cube-agency/filament-tree-view 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.71k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2024 年 01 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nestedset」 「laravel」 「filament」 「cube-agency」 「filament-tree-view」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cube-agency/filament-tree-view 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cube-agency/filament-tree-view 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cube-agency/filament-tree-view 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel 8 nested categories library
An enhanced tree management module with tree node selection and manipulation using nested sets.
Create and manage taxonomy (terms) in Laravel App
Integration of the gedmo/doctrine-extensions with Symfony2
Integration of the gedmo/doctrine-extensions with Symfony
Alfabank REST API integration
统计信息
- 总下载量: 2.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 37
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-03