<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Faka\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 ProductCategoryController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $A2Tuf) { $A2Tuf->init('faka_product_category')->field(function ($A2Tuf) { $A2Tuf->id('id', 'ID'); $A2Tuf->text('title', '名称'); $A2Tuf->display('created_at', L('Created At'))->listable(false); $A2Tuf->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $cbHm3) { $cbHm3->eq('id', L('ID')); $cbHm3->like('title', L('Title')); })->title('商品分类')->asTree()->treeMaxLevel(1); } }