swoft生成控制器
[root@localhost swoft]# swoftcli gen:controller -h
[ERROR] Command 'controller' is not exist in group: gen
Generate some common application template classes Group: gen (alias: generate)
Usage:
swoftcli gen:COMMAND [--opt ...] [arg ...] Global Options:
--debug Setting the application runtime debug level(0 - 4)
--no-color Disable color/ANSI for message output
-h, --help Display help message for application or command
-V, --version Display application version information Commands:
cli-command Generate CLI command controller class(alias: cmd, command)
crontab Generate user cronTab task class(alias: task-crontab, taskCrontab)
http-controller Generate HTTP controller class(alias: ctrl, http-ctrl)
http-middleware Generate HTTP middleware class(alias: http-mdl, httpmdl, http-middle)
listener Generate an event listener class(alias: event-listener)
process Generate user custom process class(alias: proc)
rpc-controller Generate RPC service class(alias: rpcctrl, service, rpc-ctrl)
rpc-middleware Generate RPC middleware class(alias: rpcmdl, rpc-mdl, rpc-middle)
task Generate user task class
tcp-controller Generate TCP controller class(alias: tcpc, tcpctrl, tcp-ctrl)
tcp-middleware Generate TCP middleware class(alias: tcpmdl, tcp-mdl, tcp-middle)
ws-controller Generate WebSocket message controller class(alias: wsc, wsctrl, ws-ctrl)
ws-middleware Generate WebSocket middleware class(alias: wsmdl, ws-mdl, ws-middle)
ws-module Generate WebSocket module class(alias: wsm, wsmod, ws-mod, wsModule) View the specified command, please use: swoftcli gen:COMMAND -h
[root@localhost swoft]# swoftcli gen:http-controller -h
Generate HTTP controller class Usage:
/usr/local/bin/swoftcli gen:http-controller [arguments ...] [options ...] Global Options:
--debug Setting the application runtime debug level(0 - 4)
--no-color Disable color/ANSI for message output
-h, --help Display help message for application or command
-V, --version Display application version information Arguments:
name VALUE The class name, don't need suffix and ext. eg: demo
dir VALUE The class file save dir (defaults: @app/Http/Controller) Options:
-n, --namespace VALUE The class namespace (defaults: App\Http\Controller)
--prefix STRING The route prefix for the controller, default is class name
--preview Want preview the will generated file code
--rest STRING The class will contains CURD actions (defaults: True)
--suffix STRING The class name suffix (defaults: Controller)
--tpl-dir STRING The template files directory
--tpl-file STRING The template file filename or full path (defaults: http-rest-controller.stub)
-y, --yes No need to confirm when performing file writing (defaults: False) Example:
/usr/local/bin/swoftcli gen:http-controller demo --prefix /demo -y Gen DemoController class to http controller dir
/usr/local/bin/swoftcli gen:http-controller user --prefix /users --rest Gen UserController class to http controller dir(RESTFul)
[root@localhost swoft]# swoftcli gen:http-controller member
swoft生成控制器的更多相关文章
- Laravel 安装mysql、表增加模拟数据、生成控制器
参考中文网教程: 安装mysql.表增加模拟数据 http://www.golaravel.com/post/2016-ban-laravel-xi-lie-ru-men-jiao-cheng-yi/ ...
- adv生成控制器手腕位置倾斜原因以及解决方案
系统默认问题导致手腕倾斜详情描述: 手腕部分默认生成轴向是冲向模板下一层级第一个物体 简单说就是 FK轴向冲向模板中指方向 如图 默认模板没问题是因为 默认模板没有改动情况下系统中指与手腕在一条直 ...
- laravel-admin 创建数据库并生成控制器
以user表为例 1. 生成迁移:php artisan make:migration create_users_table 在 database/migration 中生成迁移文件,可对迁移文件进行 ...
- 利用T4模板生成ASP.NET Core控制器的构造函数和参数
前言 在ASP.NET Core中引入了DI,并且通过构造函数注入参数,控制器中会大量使用DI注入各种的配置参数,如果配置注入的参数比较多,而且各个控制器需要的配置参数都基本一样的话,那么不断重复的复 ...
- ASP.NET Web API 控制器创建过程(二)
ASP.NET Web API 控制器创建过程(二) 前言 本来这篇随笔应该是在上周就该写出来发布的,由于身体跟不上节奏感冒发烧有心无力,这种天气感冒发烧生不如死,也真正的体会到了什么叫病来如山倒,病 ...
- ASP.NET MVC 控制器激活(一)
ASP.NET MVC 控制器激活(一) 前言 在路由的篇章中讲解了路由的作用,讲着讲着就到了控制器部分了,从本篇开始来讲解MVC中的控制器,控制器是怎么来的?MVC框架对它做了什么?以及前面有的篇幅 ...
- Web APi之控制器创建过程及原理解析(八)
前言 中秋歇了歇,途中也时不时去看看有关创建控制器的原理以及解析,时间拖得比较长,实在是有点心有余而力不足,但又想着既然诺下了要写完原理一系列,还需有始有终.废话少说,直入主题. HttpContro ...
- Magicodes.WeiChat——ASP.NET Scaffolding生成增删改查、分页、搜索、删除确认、批量操作、批量删除等业务代码
关于T4代码生成这块,我之前写过几篇帖子,如:<Magicodes.NET框架之路——让代码再飞一会(ASP.NET Scaffolding)>(http://www.cnblogs.co ...
- MVC使用基架添加控制器出现的错误:无法检索XXX的元数据
环境 vs2012 框架 mvc3 数据库 sqlservercompact4.0 出现的错误如下: “ ---------------------------Microsoft Visual St ...
随机推荐
- 通达OA任意用户登录漏洞复现
前言 今年hw挺火爆的,第一天上来就放王炸,直接搞得hw暂停 昨天晚上无聊,复现了一下通达oa的洞,也有现成的exp可以使用,比较简单 0x00 漏洞概述 通达OA是一套国内常用的办公系统,此次发现的 ...
- oracle数据处理之sql*loader(一)
SQL*Loader是oracle提供的可以从多种平面文件中向数据库中加载数据的工具,它比较适合业务分析类型数据库(数据仓库);使用sqlldr工具可以在很短的时间内向数据库中加载大量的数据,像把制作 ...
- oracle数据处理之sql*loader(二)
目录 SQL*Loader对不同文件及格式的处理方法 2.1 Excel文件 一般的Excel文件最大行数不超过65536行,说明数据处理量并不大,处理Excel的方式是将其另存为CSV格式文件,然后 ...
- openwrt 单网卡路由模拟实现
关键字 vlan openwrt 单臂路由 一直以来都认为路由器要至少要求是双网卡,因为至少要有lan/wan.最近看了单臂路由的介绍,自己在虚拟机测试了一把,发现单网口做路由器确实可行! 测试环境 ...
- yum管理——yum常用配置(2)
一.网络源的缓存设置 [root@yunwei ~]# vim /etc/yum.conf [main] cachedir=/var/cache/yum/$basearch/$releasever k ...
- CRM、用户管理权限
CRM目录结构 from django.shortcuts import HttpResponse,render,redirect from django.conf.urls import url f ...
- 堆的源码与应用:堆排序、优先队列、TopK问题
1.堆 堆(Heap))是一种重要的数据结构,是实现优先队列(Priority Queues)首选的数据结构.由于堆有很多种变体,包括二项式堆.斐波那契堆等,但是这里只考虑最常见的就是二叉堆(以下简称 ...
- nginx特性
nginx特点: 更快,高扩展性,高可靠性,低能耗性,单机支持10w以上的并发连接,热部署,自由的BSD, Apache.Lighttpd.Tomcat.Jetty.IIS,它们都是Web服务器 SN ...
- 创建Vue项目及封装axios
1. 始vue化项目 https://www.cnblogs.com/xiaonq/p/11027880.html vue init webpack deaxios # 使用脚手架创建项目 deaxi ...
- Centos-bzip2压缩文件-bzip2 bunzip2
bzip2 buzip2 对文件进行压缩与解压缩,类似 gzip gunzip命令,只能压缩文件,对目录则压缩目录下文件,生成以 .bz2为扩展名的文件 相关选项 -d 解压 -v 压缩或解压显示详细 ...