[scode type="yellow"]tp6创建多应用

执行指令安装多应用模式功能:

需要删除app目录下controller目录

[/scode]

composer require topthink/think-multi-app

[scode type="lblue"]创建应用模块 如:admin[/scode]

php think build admin

[scode type="lblue"]创建控制器 如:Ad[/scode]

php think make:controller Ad

[scode type="lblue"]创建模型如:user[/scode]

php think make:model User

[scode type="lblue"]创建中间件 如:Check[/scode]

php think make:middleware Check

[scode type="lblue"]单应用模式下生成验证器命令如:save[/scode]

 php think make:middleware Save 

[scode type="lblue"]

多应用模式下生成验证器命令:[/scode]

php think make:validate admin@stu

[scode type="lblue"]安装扩展包[/scode]

composer require topthink/think-captcha

[scode type="lblue"]生成资源控制器命令单应用[/scode]

php think make:controller Test