<?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 vO598; vfSr9: return $FGotH; goto nrq5y; cW_3L: $FGotH->canMultiSelectItem(true)->canBatchDelete(true); goto QVm_X; vO598: $FGotH = new Grid(AdminLog::class, function (Grid $FGotH) { $FGotH->display('id', L('ID'))->width(80); $FGotH->select('adminUserId', L('Admin User'))->optionModel('admin_user', 'id', 'username'); $FGotH->type('type', L('Type'))->type(AdminLogType::class)->width(100); $FGotH->display('summary', L('Title')); $FGotH->jsonKeyValue('data.content', L('Data')); $FGotH->display('created_at', L('Created At'))->width(160); $FGotH->gridFilter(function (GridFilter $Nxn6E) { $Nxn6E->eq('adminUserId', L('Admin User'))->selectModel('admin_user', 'id', 'username'); $Nxn6E->like('summary', L('Title')); $Nxn6E->eq('type', L('Type'))->radio(AdminLogType::class); }); }); goto krPTT; QVm_X: $FGotH->title(L('Admin Log')); goto vfSr9; rZ9yO: $FGotH->canDelete(AdminPermission::permit('AdminLogManage')); goto cW_3L; krPTT: $FGotH->canAdd(false)->canEdit(false); goto rZ9yO; nrq5y: } protected function form() { $SKFwZ = new Form(AdminLog::class, function (Form $SKFwZ) { $SKFwZ->display('id', L('ID'))->editable(true); }); return $SKFwZ; } protected function detail() { goto C7WAB; HzinD: return $DdILw; goto s509S; C7WAB: $DdILw = new Detail(AdminLog::class, function (Detail $DdILw) { $DdILw->display('id', L('ID')); $DdILw->display('created_at', L('Created At')); $DdILw->type('type', L('Type'))->type(AdminLogType::class); $DdILw->display('summary', L('Title')); $DdILw->jsonKeyValue('data.content', L('Data')); }); goto z3xYy; z3xYy: $DdILw->title(L('Admin Log')); goto HzinD; s509S: } }