ydtg1993 / Dendrogram
php系统树图扩展组件
Stars: ✭ 106
Labels
Projects that are alternatives of or similar to Dendrogram
Sarala
Javascript library to communicate with RESTful API built following JSON API specification. inspired by Laravel’s Eloquent
Stars: ✭ 101 (-4.72%)
Mutual labels: laravel
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-3.77%)
Mutual labels: laravel
Larasupport
📦 Adds Laravel Packages Support to Lumen and Vendor Publish Artisan Command.
Stars: ✭ 104 (-1.89%)
Mutual labels: laravel
Laravel Like Comment
Ajax based site wide like and commenting system for laravel.
Stars: ✭ 105 (-0.94%)
Mutual labels: laravel
Laravel Json Schema
Create all your migrations and models from one JSON schema file.
Stars: ✭ 101 (-4.72%)
Mutual labels: laravel
Laravel Factory Prefill
Prefills factories with faker method suggestions to increase productivity
Stars: ✭ 104 (-1.89%)
Mutual labels: laravel
Laravel Settings
Persistent key-value storage for Laravel, json value supported. l10n supported.
Stars: ✭ 101 (-4.72%)
Mutual labels: laravel
Laravel Translatable
Making Eloquent models translatable
Stars: ✭ 1,390 (+1211.32%)
Mutual labels: laravel
Collect
A Collections-only split from Laravel's Illuminate Support
Stars: ✭ 1,433 (+1251.89%)
Mutual labels: laravel
Asset Cdn
Serve Laravel Assets from a Content Delivery Network (CDN)
Stars: ✭ 101 (-4.72%)
Mutual labels: laravel
Laravel Stats
📈 Get insights about your Laravel or Lumen Project
Stars: ✭ 1,386 (+1207.55%)
Mutual labels: laravel
Ardent
Self-validating, secure and smart models for Laravel's Eloquent ORM
Stars: ✭ 1,412 (+1232.08%)
Mutual labels: laravel
Laravel Dashboard Chart Tile
Create all the charts you want for your laravel dashboard
Stars: ✭ 102 (-3.77%)
Mutual labels: laravel
PHP系统树图
PHP系统树图可快速的处理无限极分类的业务需求 提供两种不同的数据结构和三种视图类型
数据结构 | adjacency list | nested sets | |
---|---|---|---|
视图类型 | 目录 catalog | 茎状 rhizome | 下拉列表 select |
1.安装
composer require dendrogram/dendrogram:v2.0
2.配置
首先往Laravel应用中注册ServiceProvider,打开文件config/app.php,在providers中添加一项:
'providers' => [
DenDroGram\DendrogramServiceProvider::class
]
3.发布
然后发布拓展包的配置文件,使用如下命令:
php artisan vendor:publish
会在config目录下会生成dendrogram.php的配置文件
4.数据导入
php artisan migrate
两表四个自定义函数 表名可先行在配置文件中修改.以保持与自定义函数内的表名一致
migrations下增加中国城市sql文件
由于查询节点过多需要配置mysql
SET GLOBAL group_concat_max_len = 20460;
数据结构概述
adjacency结构 以父节点为基准的链式查询 增删容易 查询不便
nested结构 以左右值包容形式 增删不便 查询容易
code说明
生成对象
/*adjacency list数据结构*/
new DenDroGram(AdjacencyList::class)
/*nested set数据结构*/
new DenDroGram(NestedSet::class)
调用方法
调用方法 | 方法说明 | 方法参数 | 返回内容 |
---|---|---|---|
buildCatalog | 生成目录式结构树 | 根节点id 操作节点的路由POST方式 节点显示字段 |
html文本 |
buildRhizome | 生成根茎视图 | 根节点id 操作节点的路由POST方式 节点显示字段 |
html文本 |
buildSelect | 生成下拉列表 | 根节点id 列表选项显示字段 列表选项值 列表选项默认值 |
html文本 获取选项结果可在js中调用dendrogramUS.storage() 点击选项回调方法dendrogramUS.callback() |
operateNode | 节点操作 | action增删改标识 data节点详情数据 |
返回boolean |
getTreeData | 获取结构型数据 | 根节点id | 返回array |
获取数据
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].