当前位置: 首页 > news >正文

静安建设机械网站长沙网站seo优化公司

静安建设机械网站,长沙网站seo优化公司,电商网站开发技术,产品推广软文300字在使用tp框架的时候tp内置了一个think的命令行工具, 这个工具可以帮助我们快速的生成控制器,模型,中间件的代码。 这个工具就和laravel中的 artisan 的作用都差不多,只是名称不同而已。 tp中常用的命令行工具: 1. 快…

在使用tp框架的时候tp内置了一个think的命令行工具, 这个工具可以帮助我们快速的生成控制器,模型,中间件的代码。 这个工具就和laravel中的 artisan 的作用都差不多,只是名称不同而已。

tp中常用的命令行工具:

1. 快速生成应用

如果使用了多应用模式,可以快速生成一个应用,例如生成demo应用的指令如下:

php think build demo

会自动生成demo应用,自动生成的应用目录包含了controller、model和view目录以及common.php、middleware.php、event.php和provider.php等文件。生成成功后,我们可以直接访问demo应用.

2. 快速生成控制器

 php think make:controller index@Blog
 空控制器生成: php think make:controller index@Blog --plain


  带后缀的类库: php think make:controller index@BlogController


 3. 快速生成模型
 php think make:model index@Blog
 带后缀的类库:php think make:model index@BlogModel

快速生成服务: php think make:service index@BlogService


 4. 快速生成中间件
 php think make:middleware Auth
 
 5. 创建验证器类
 php think make:validate index@User
 
 6. 创建自定义指令
 php think make:command Hello hello

7. 清理缓存
 php think clear
 生成路由映射缓存optimize:route
 php think optimize:route index

php think命令行帮助

php think              

version 8.0.3

Usage:

  command [options] [arguments]

Options:

  -h, --help            Display this help message

  -V, --version         Display this console version

  -q, --quiet           Do not output any message

      --ansi            Force ANSI output

      --no-ansi         Disable ANSI output

  -n, --no-interaction  Do not ask any interactive question

  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:

  build             Build App Dirs

  clear             Clear runtime file

  help              Displays help for a command

  list              Lists commands

  run               PHP Built-in Server for ThinkPHP

  version           show thinkphp framework version

 make

  make:command      Create a new command class

  make:controller   Create a new resource controller class

  make:event        Create a new event class

  make:listener     Create a new listener class

  make:middleware   Create a new middleware class

  make:model        Create a new model class

  make:service      Create a new Service class

  make:subscribe    Create a new subscribe class

  make:validate     Create a validate class

 optimize

  optimize:route    Build app route cache.

  optimize:schema   Build database schema cache.

 route

  route:list        show route list.

 service

  service:discover  Discover Services for ThinkPHP

 vendor

  vendor:publish    Publish any publishable assets from vendor packages

http://www.yayakq.cn/news/491609/

相关文章:

  • 企业网网站怎么做小程序制作定制开发
  • 全网营销型网站 新闻wordpress 主题详解
  • 石家庄城乡建设管理局网站重庆教育网站建设
  • 网站建设我们的优势wordpress目录结构分析
  • wordpress 多网站吗centos7 wordpress
  • 网站建设经费保障中国建筑集团有限公司是央企还是国企
  • 做网站买域名漏惹网站做
  • 北京做网站比较有名的公司有哪些微网站平台
  • 桂林北站到龙脊梯田沈阳网页设计培训
  • icp网站建设衡水网站建设找谁
  • jsp商务网站建设asp影视网站源码
  • 做一个网站的详细教学义乌官网制作网站
  • 网站建设的主要问题9uu域名更新自动转跳
  • 网站后台教程小红网站建设
  • 点击最高的模板网站盐城市滨海县建设局网站
  • 海洋网络专业网站建设郑州做网站公司有多少钱
  • 网站的功能和作用是什么郑州公共住宅建设投资有限公司网站
  • php网站开发工程师职责崇安区网站建设价格
  • 昆明专门做网站手游折扣平台app哪个好
  • 重庆网站建设价格费用杭州哪家做外贸网站好
  • 网络营销课程实训总结seovip培训
  • 新津网站建设青海建筑人才网
  • 吉林新农村建设网站自学网站建设买什么书
  • 灵犀科技 高端网站建设大庆市建设局网站刘东
  • 做的网站怎么放到网上徐州市徐州市城乡建设局网站首页
  • 帝国cms做英文网站wordpress怎样设置留言板
  • 成都网站建设公司汇总饰品行业网站开发
  • 做网站 智域大连网上三维展馆网站是怎么做的
  • 公司备案号查询网站织梦网站优化怎么做
  • 网站建设了推广方案wordpress汉化主题下载地址