zhujinkui / tp5-category
This is an infinite Classification Library Based on the ThinkPHP5 framework
V1.0
2018-03-03 03:06 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-12-13 18:03:27 UTC
README
这是一个基于ThinkPHP5框架的无限分类库
案例展示
安装
composer require zhujinkui/tp5-category
代码举例使用
建立Node控制器,读取节点列表
<?php
namespace app\common\controller;
use think\Controller;
class Node extends Controller
{
/**
* [index 节点管理]
* @return array [节点树]
*/
public function index()
{
$cat = new \think\Category('authRule', ['id', 'pid', 'title', 'fullname']);
$temp = $cat->getList();
}
}