PHP code example of zhujinkui / tp5-category
1. Go to this page and download the library: Download zhujinkui/tp5-category library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zhujinkui / tp5-category example snippets
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();
}
}