<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Area\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Concern\HasAdminQuickCRUD; use ModStart\Admin\Layout\AdminCRUDBuilder; use ModStart\Core\Input\InputPackage; use ModStart\Core\Util\CRUDUtil; use ModStart\Form\Form; use ModStart\Grid\GridFilter; use ModStart\Support\Concern\HasFields; use Module\Area\Util\AreaChinaUtil; class AreaChinaController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $P2vse) { goto R5ADg; UXTrS: $XuPNX = $Km8YS->getInteger('_pid', 0); goto Afzgs; Afzgs: $P2vse->init('area_china')->field(function ($P2vse) { $P2vse->number('id', '地区ID')->addable(true)->editable(true)->rules('required')->rules('unique:area_china,id,' . CRUDUtil::id()); $P2vse->text('title', '地区名称')->rules('required'); $P2vse->display('created_at', L('Created At'))->listable(false); $P2vse->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $mHisM) { $mHisM->eq('areaId', '地区ID'); $mHisM->like('title', '地区名称'); })->title('中国地区')->asTreeMass($XuPNX)->treeMaxLevel(3)->defaultOrder(array('sort', 'asc'))->canShow(false)->canBatchDelete(true)->hookChanged(function (Form $NX6uw) { AreaChinaUtil::clearCache(); }); goto kQbU9; R5ADg: $Km8YS = InputPackage::buildFromInput(); goto UXTrS; kQbU9: } }