<?php
 namespace Module\ShortLink\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Concern\HasAdminQuickCRUD; use ModStart\Admin\Layout\AdminCRUDBuilder; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\TimeUtil; use ModStart\Field\AbstractField; use ModStart\Field\AutoRenderedFieldValue; use ModStart\Form\Form; use ModStart\Grid\GridFilter; use ModStart\Support\Concern\HasFields; use Module\Member\Util\MemberCmsUtil; use Module\ShortLink\Util\LinkDomainUtil; use Module\ShortLink\Util\LinkUtil; class LinkDomainController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $builder) { $builder ->init('link_domain') ->field(function ($builder) { $builder->id('id', 'ID'); $builder->text('urlBase', '域名URL')->help('格式为 http://www.example.com'); $builder->display('created_at', L('Created At')); $builder->display('updated_at', L('Updated At'))->listable(false); }) ->gridFilder(function (GridFilter $filter) { $filter->eq('id', L('ID')); $filter->eq('urlBase', '域名URL'); }) ->hookChanged(function (Form $form) { LinkDomainUtil::clearCache(); }) ->canShow(false) ->title('短网址域名'); } }