<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Express\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 ShippingCompanyController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $P2vse) { $P2vse->init('shipping_company')->field(function ($P2vse) { $P2vse->id('id', 'ID'); $P2vse->switch('active', '启用'); $P2vse->text('code', '代码')->width(120); $P2vse->text('name', '名称')->width(120); $P2vse->display('created_at', '创建时间')->width(180); $P2vse->display('updated_at', '更新时间')->width(180); })->gridFilter(function (GridFilter $mHisM) { $mHisM->eq('id', L('ID')); $mHisM->like('name', '名称'); })->defaultOrder(array('sort', 'asc'))->canShow(false)->canSort(true)->title('快递公司'); } }