Blogger Information
Blog 128
fans 9
comment 5
visits 241240
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
15.【TP6学习笔记】命令行的方式快速生成模型
 一纸荒凉* Armani
Original
1341 people have browsed it

快速生成模型

和生成控制器类似,执行下面的指令可以生成index应用的Blog模型类库文件

>php think make:model index@Blog

如果是单应用模式,无需传入应用名

>php think make:model Blog

生成的模型类文件如下:

<?phpnamespace app\index\model;use think\Model;class Blog extends Model{    //}

生成带后缀的类库

如果要生成带后缀的类库,可以直接使用:

>php think make:controller index@BlogController>php think make:model BlogModel
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post