<?php
 namespace TechSoft\Laravel\Mod; use TechOnline\Laravel\Http\InputPackage; use TechOnline\Laravel\Http\Response; use TechSoft\Laravel\Admin\Support\AdminCheckController; class ModManageAdminController extends AdminCheckController { public function lists() { return view('soft::admin.modManage.list', [ 'locals' => ModUtil::locals(), 'enables' => ModUtil::enables(), ]); } public function install() { $input = InputPackage::buildFromInput(); $mod = $input->getTrimString('mod'); $ret = ModUtil::install($mod); if ($ret['code']) { return Response::send(-1, $ret['msg']); } return Response::send(0, '安装成功', null, '[reload]'); } public function uninstall() { $input = InputPackage::buildFromInput(); $mod = $input->getTrimString('mod'); $ret = ModUtil::uninstall($mod); if ($ret['code']) { return Response::send(-1, $ret['msg']); } return Response::send(0, '卸载成功', null, '[reload]'); } public function market() { return view('soft::admin.modManage.market'); } }