<?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 wIRG_; T5wp6: $BtYIX->canMultiSelectItem(true)->canBatchDelete(true); goto dfnEs; QKTRQ: $BtYIX->canAdd(false)->canEdit(false); goto x3OAC; dfnEs: $BtYIX->title(L('Admin Log')); goto wE0gn; wIRG_: $BtYIX = new Grid(AdminLog::class, function (Grid $BtYIX) { $BtYIX->display('id', L('ID'))->width(80); $BtYIX->select('adminUserId', L('Admin User'))->optionModel('admin_user', 'id', 'username'); $BtYIX->type('type', L('Type'))->type(AdminLogType::class)->width(100); $BtYIX->display('summary', L('Title')); $BtYIX->jsonKeyValue('data.content', L('Data')); $BtYIX->display('created_at', L('Created At'))->width(160); $BtYIX->gridFilter(function (GridFilter $pvsQp) { $pvsQp->eq('adminUserId', L('Admin User'))->selectModel('admin_user', 'id', 'username'); $pvsQp->like('summary', L('Title')); $pvsQp->eq('type', L('Type'))->radio(AdminLogType::class); }); }); goto QKTRQ; wE0gn: return $BtYIX; goto yVIJM; x3OAC: $BtYIX->canDelete(AdminPermission::permit('AdminLogManage')); goto T5wp6; yVIJM: } protected function form() { $mjvnb = new Form(AdminLog::class, function (Form $mjvnb) { $mjvnb->display('id', L('ID'))->editable(true); }); return $mjvnb; } protected function detail() { goto ynjx9; TetEX: return $lOR1G; goto eUzvn; ynjx9: $lOR1G = new Detail(AdminLog::class, function (Detail $lOR1G) { $lOR1G->display('id', L('ID')); $lOR1G->display('created_at', L('Created At')); $lOR1G->type('type', L('Type'))->type(AdminLogType::class); $lOR1G->display('summary', L('Title')); $lOR1G->jsonKeyValue('data.content', L('Data')); }); goto vVM9x; vVM9x: $lOR1G->title(L('Admin Log')); goto TetEX; eUzvn: } }