LLEARNING NOTES

技术 · 思考 · 实践 · 成长

首页/ThinkPHP6/正文

Tp6 常见命令

ThinkPHP6519 次阅读

php版本要求 > php7.1


1、composer 镜像

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/


2、composer 安装thinkphp6

composer create-project  topthink/think  mytp6web


命令行使用:

快速生成应用

php  think build admin
php  think build api


注意:使用build命令时,必须先安装多应用模式扩展

compoesr require  topthink/think-multi-app


快速生成控制器

php think make:controller  admin@Banner


注意:如果不需要自动生成默认方法,添加 --plain

php think make:controller admin@Banner  --plain


快速生成模型

php think make:model  admin@Banner


快速生成中间件

php think make:middleware  Auth


创建验证器类

php think make:validate  admin@User


phpstudy 下 nginx伪静态

if (!-e $request_filename) {
    rewrite  ^(.*)$  /index.php?s=$1  last;
    break;
}


梦想在远方闪烁,脚步则需踏实前行。

评论交流

理性讨论,共同进步
验证码

相关文章

继续阅读