第一步:安装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
- 空白目录
- 数据表的创建
- auth _rule
- auth_group
- auth_group_access
- 权限示例
- Auth权限菜单
- Auth用户组权限修改
- Auth用户规则表
- Auth权限的使用
- 源码示例
- thinkphp6auth
- 安装与拓展
- auth
- thinkphp6.0权限扩展
- ThinkPHP3.2.3完整版中对Auth.class.php的使用
- ThinkPHP6.x中对Auth的使用[tp6-auth权限管理]
- Thinkphp6+Auth+LayuiAdmin+authtree权限管理
- 使用phpstudy安装
- 使用宝塔安装thinkphp
- thinkphp6 伪静态配置(nginx和Apache)
- apiadmin安装教程