<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Tracking\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 AgentController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $P0Vsm) { $P0Vsm->init('tracking_agent')->field(function ($P0Vsm) { $P0Vsm->id('id', 'ID'); $P0Vsm->text('sn', '编码')->required()->ruleUnique('tracking_agent'); $P0Vsm->text('name', '名称')->required(); $P0Vsm->text('phone', '手机')->required(); $P0Vsm->display('created_at', L('Created At'))->listable(false); $P0Vsm->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $roX32) { $roX32->eq('id', L('ID')); $roX32->like('name', L('Name')); })->title('经销商'); } }