ctfang/swoft-admin

swoft webtool component

Installs: 152

Dependents: 0

Suggesters: 0

Security: 0

Stars: 16

Watchers: 1

Forks: 7

Open Issues: 0

Language:JavaScript

0.1.0 2020-06-23 07:13 UTC

This package is auto-updated.

Last update: 2024-10-23 16:18:40 UTC


README

swoft的web开发辅助工具

安装

composer require ctfang/swoft-admin 

下载主干 composer require ctfang/swoft-admin dev-master

配置

app/bean.php 新增

    'adminServer'        => [
        'class'    => AdminServer::class,
        'port'     => 18366,
        'on'       => [
            SwooleEvent::REQUEST => bean(RequestListener::class),
        ],
        /* @see HttpServer::$setting 静态文件配置 */
        'setting'  => [
            'enable_static_handler' => true,
            'document_root' => __DIR__."/../vendor/ctfang/swoft-admin/public/",
        ]
    ],

修改 .env 配置

默认 ADMIN_WEB = http://127.0.0.1/public/

# 设置ip访问限制 (默认不限制)
ADMIN_ALLOW="*.*.*.*"
# 打开登录开关 (默认登录后才能访问)
ADMIN_ENABLE_LOGIN=1
# 配置静态文件地址
ADMIN_WEB="http://127.0.0.1:18366/"

启动

php bin/swoft admin:start

如果需要在 http:start 也能访问,需要设置 .env

ADMIN_ENABLE=1

访问,默认账号密码 username = admin ; password = 123456

http://your.com/__admin/login

修改密码

复制文件 vendor/ctfang/swoft-admin/src/Config/user.config.php@config/__admin.php@config/__admin.php

计划