thinkphp的常用composer命令

windows系统

先运行cmd进入到应用目录,建立tp5项目
composer create-project topthink/think tp5

然后进入tp5目录
比如 cd: C:\wwwroot\haha\web\tp5,而后执行:

建立模型
php think make:model Blog

建立控制器
php think make:controller index/Blog --plain
php think make:controller index/Rout --plain

建立中间件
php think make:middleware Check

建立验证器
php think make:validate index/Blog

更多方法:https://github.com/top-think/think

猜你喜欢

转载自blog.csdn.net/tv002/article/details/87902757