<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Edm\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 TemplateController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $JeXgT) { $JeXgT->init('edm_template')->field(function ($JeXgT) { $JeXgT->id('id', 'ID'); $JeXgT->text('title', '名称'); $JeXgT->text('subject', '主题')->help('<a href="javascript:;" data-dialog-request="' . modstart_admin_url('edm/template/param') . '" data-dialog-width="90%" data-dialog-height="90%"><i class="iconfont icon-code"></i>可用变量</a>'); $JeXgT->richHtml('content', '内容')->htmlFilter(false)->listable(false)->help('<a href="javascript:;" data-dialog-request="' . modstart_admin_url('edm/template/param') . '" data-dialog-width="90%" data-dialog-height="90%"><i class="iconfont icon-code"></i>可用变量</a>'); $JeXgT->display('created_at', L('Created At'))->listable(false); $JeXgT->display('updated_at', L('Updated At'))->listable(false); })->gridFilter(function (GridFilter $FdfN8) { $FdfN8->eq('id', L('ID')); $FdfN8->like('title', L('Title')); })->title('邮件营销列表'); } public function param() { return view('module::Edm.View.admin.template.param'); } }