<?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 qnaxs; LE01F: return $H0Ja4; goto v5fhr; RxHdF: $H0Ja4->canMultiSelectItem(true)->canBatchDelete(true); goto xUbrZ; g1VZt: $H0Ja4->canDelete(AdminPermission::permit('AdminLogManage')); goto RxHdF; xUbrZ: $H0Ja4->title(L('Admin Log')); goto LE01F; qnaxs: $H0Ja4 = new Grid(AdminLog::class, function (Grid $H0Ja4) { $H0Ja4->display('id', L('ID'))->width(80); $H0Ja4->select('adminUserId', L('Admin User'))->optionModel('admin_user', 'id', 'username'); $H0Ja4->type('type', L('Type'))->type(AdminLogType::class)->width(100); $H0Ja4->display('summary', L('Title')); $H0Ja4->jsonKeyValue('data.content', L('Data'))->width(200); $H0Ja4->display('created_at', L('Created At'))->width(160); $H0Ja4->gridFilter(function (GridFilter $DMbpM) { $DMbpM->eq('adminUserId', L('Admin User'))->selectModel('admin_user', 'id', 'username'); $DMbpM->like('summary', L('Title')); $DMbpM->eq('type', L('Type'))->radio(AdminLogType::class); }); }); goto V7WOX; V7WOX: $H0Ja4->canAdd(false)->canEdit(false); goto g1VZt; v5fhr: } protected function form() { $dBWZm = new Form(AdminLog::class, function (Form $dBWZm) { $dBWZm->display('id', L('ID'))->editable(true); }); return $dBWZm; } protected function detail() { goto hTwm8; C2g1y: return $MSE_o; goto KiAhi; hTwm8: $MSE_o = new Detail(AdminLog::class, function (Detail $MSE_o) { $MSE_o->display('id', L('ID')); $MSE_o->display('created_at', L('Created At')); $MSE_o->type('type', L('Type'))->type(AdminLogType::class); $MSE_o->display('summary', L('Title')); $MSE_o->jsonKeyValue('data.content', L('Data')); }); goto NJwxY; NJwxY: $MSE_o->title(L('Admin Log')); goto C2g1y; KiAhi: } }