mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 20:48:09 +08:00
64 lines
2.2 KiB
PHP
64 lines
2.2 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
/**
|
||
* +----------------------------------------------------------------------
|
||
* | ThinkAdmin Plugin for ThinkAdmin
|
||
* +----------------------------------------------------------------------
|
||
* | 版权所有 2014~2026 ThinkAdmin [ thinkadmin.top ]
|
||
* +----------------------------------------------------------------------
|
||
* | 官方网站: https://thinkadmin.top
|
||
* +----------------------------------------------------------------------
|
||
* | 开源协议 ( https://mit-license.org )
|
||
* | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||
* | 会员特权 ( https://thinkadmin.top/vip-introduce )
|
||
* +----------------------------------------------------------------------
|
||
* | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
|
||
* | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
|
||
* +----------------------------------------------------------------------
|
||
*/
|
||
// | Center Plugin for ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
// | 版权所有 2014~2025 Anyon <zoujingli@qq.com>
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网站: https://thinkadmin.top
|
||
// +----------------------------------------------------------------------
|
||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||
// +----------------------------------------------------------------------
|
||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-center
|
||
// +----------------------------------------------------------------------
|
||
|
||
use think\admin\extend\PhinxExtend;
|
||
use think\migration\Migrator;
|
||
|
||
class InstallCenter20241010 extends Migrator
|
||
{
|
||
/**
|
||
* 获取脚本名称.
|
||
*/
|
||
public function getName(): string
|
||
{
|
||
return 'CenterPlugin';
|
||
}
|
||
|
||
public function change()
|
||
{
|
||
set_time_limit(0);
|
||
@ini_set('memory_limit', '-1');
|
||
$this->insertMenu();
|
||
}
|
||
|
||
private function insertMenu()
|
||
{
|
||
PhinxExtend::write2menu([
|
||
[
|
||
'name' => '插件入口',
|
||
'sort' => '999',
|
||
'node' => 'plugin-center/index/index',
|
||
],
|
||
], [
|
||
'url|node' => 'plugin-center/index/index',
|
||
]);
|
||
}
|
||
}
|