<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\CmsHelp\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Concern\HasAdminQuickCRUD; use ModStart\Admin\Layout\AdminCRUDBuilder; use ModStart\Grid\GridFilter; use ModStart\Support\Concern\HasFields; class CmsHelpCategoryController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $kC4To) { $kC4To->init('cms_help_category')->field(function ($kC4To) { $kC4To->id('id', 'ID'); $kC4To->text('name', '名称'); $kC4To->display('created_at', L('Created At'))->listable(false); $kC4To->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $bWyIm) { $bWyIm->eq('id', L('ID')); $bWyIm->like('name', L('Title')); })->title('帮助分类')->asTree('id', 'pid', 'sort', 'name')->treeMaxLevel(2); } }