🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
第一步:安装TP composer create-project topthink/think tp && cd tp 获取多应用包 composer require topthink/think-multi-app 添加api应用 php think build api ================拓展区开始============================= 添加控制器 // app/controller/User.php php think make:controller User // app/admin/controller/User.php php think make:controller admin@User 添加模型 //app/model/User.php php think make:model User //app/admin/model/User.php php think make:model admin@User 添加验证器 //app/validate/User php think make:validate User //app/index/validate/User php think make:validate index@User 命令行生成中间件 //app/middleware/Auth php think make:middleware Auth //app/middleware/admin/Auth php think make:middleware admin/Auth ================拓展区结束============================= 获取试图包 composer require topthink/think-view 第二步:安装本框架 composer require thans/layui-admin 第三步: //修改.example.env [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 DATABASE = tpadmin USERNAME = root PASSWORD = root HOSTPORT = 3306 CHARSET = utf8 DEBUG = true PREFIX = mu_ php think layuiAdmin:install 第四步: 先配置好数据库 php think migrate:run 安装完成。访问:http://hostname/admin/login.html admin 12456 将密码重置为123456 php think layuiAdmin:repwd -p 123456 将密码随机重置 php think layuiAdmin:repwd