<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Auth\AdminPermission; use ModStart\Admin\Concern\HasAdminCRUD; use ModStart\Admin\Model\AdminLog; use ModStart\Admin\Type\AdminLogType; use ModStart\Detail\Detail; use ModStart\Form\Form; use ModStart\Grid\Grid; use ModStart\Grid\GridFilter; class AdminLogController extends Controller { use HasAdminCRUD; protected function grid() { goto vKK9m; PooUv: $aGu71->canDelete(AdminPermission::permit('AdminLogManage')); goto CHJxT; lmv7Y: return $aGu71; goto mavtr; uqhcW: $aGu71->title(L('Admin Log')); goto lmv7Y; Wphm7: $aGu71->canAdd(false)->canEdit(false); goto PooUv; CHJxT: $aGu71->canMultiSelectItem(true)->canBatchDelete(true); goto uqhcW; vKK9m: $aGu71 = new Grid(AdminLog::class, function (Grid $aGu71) { $aGu71->display('id', L('ID'))->width(80); $aGu71->select('adminUserId', L('Admin User'))->optionModel('admin_user', 'id', 'username'); $aGu71->type('type', L('Type'))->type(AdminLogType::class)->width(100); $aGu71->display('summary', L('Title')); $aGu71->jsonKeyValue('data.content', L('Data')); $aGu71->display('created_at', L('Created At'))->width(160); $aGu71->gridFilter(function (GridFilter $JCV6U) { $JCV6U->eq('adminUserId', L('Admin User'))->selectModel('admin_user', 'id', 'username'); $JCV6U->like('summary', L('Title')); $JCV6U->eq('type', L('Type'))->radio(AdminLogType::class); }); }); goto Wphm7; mavtr: } protected function form() { $u4AHU = new Form(AdminLog::class, function (Form $u4AHU) { $u4AHU->display('id', L('ID'))->editable(true); }); return $u4AHU; } protected function detail() { goto e7bXA; e7bXA: $jDI3Z = new Detail(AdminLog::class, function (Detail $jDI3Z) { $jDI3Z->display('id', L('ID')); $jDI3Z->display('created_at', L('Created At')); $jDI3Z->type('type', L('Type'))->type(AdminLogType::class); $jDI3Z->display('summary', L('Title')); $jDI3Z->jsonKeyValue('data.content', L('Data')); }); goto pTNw8; ktPvp: return $jDI3Z; goto XAg3q; pTNw8: $jDI3Z->title(L('Admin Log')); goto ktPvp; XAg3q: } }