<?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 $IuwRA) { goto B6DgX; B6DgX: $Nw6ws = InputPackage::buildFromInput(); goto hvLqC; WY0TD: $IuwRA->init('area_china')->field(function ($IuwRA) { $IuwRA->number('id', '地区ID')->addable(true)->editable(true)->rules('required|unique:area_china,id,' . CRUDUtil::id()); $IuwRA->text('title', '地区名称')->rules('required'); $IuwRA->display('created_at', L('Created At'))->listable(false); $IuwRA->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $wPpmz) { $wPpmz->eq('areaId', '地区ID'); $wPpmz->like('title', '地区名称'); })->title('中国地区')->asTreeMass($L97qA)->treeMaxLevel(3)->defaultOrder(array('sort', 'asc'))->canShow(false)->canBatchDelete(true)->hookChanged(function (Form $s4jIj) { AreaChinaUtil::clearCache(); }); goto og0hA; hvLqC: $L97qA = $Nw6ws->getInteger('_pid', 0); goto WY0TD; og0hA: } }