zhujinkui / tp5-category

这是一个基于ThinkPHP5框架的无限制分类库

V1.0 2018-03-03 03:06 UTC

This package is auto-updated.

Last update: 2024-09-13 17:25:27 UTC


README

这是一个基于ThinkPHP5框架的无限分类库

案例展示

基于ThinkPHP5开发,展示分页效果
Image text

安装

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();
    }
 }