CLI Console
CLI Console
New to 3.0 is a command line utility aptly named Nova located in the root. It currently supports creating controllers and models from the command line.
To use it navigate to the project in your command line/terminal then type php nova followed by the command.
Typing just 'php nova' will give this output:
Nova Framework Command Line Interface for v3.0 version 1.3.0
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--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:
help Displays help for a command
list Lists commands
clear
clear:cache Clears the cache folder
clear:logs Clears the log files
clear:sessions Clears the sessions folder
make
make:controller Create a controller
make:key Generate an encryption key for the config file
make:model Create a model
Creating a controller
To create a controller type make:controller followed by the names of the methods to be created:
php nova make:controller lists index add edit view delete
This will create a controller called Lists with 5 methods, additionally a Lists folder will be created in the views folder along with 5 files, one for each method. The files will be empty.
Creating a model
To create a model type model followed by the names of the methods to be created:
php nova make:model lists getAll add edit delete
This will create a controller called Lists with 4 methods.
Generate an Encryption Key
To genereate an encryption key for app/Config.php, type in the following:
php nova make:key
This will generate a 32 character alpha-numeric key.
CLI Console的更多相关文章
- phalcon的CLI应用
CLI应用是命令行下执行的程序, 可以应用于定时任务,守护进程, 脚本, 公用命令等等. 最小的目录结构:app/config/config.phpapp/tasks/MainTask.phpapp/ ...
- openstack资料相关
https://github.com/int32bit/openstack-workflow #openstack各种时序图 http://docs.openstack.org/developer/ ...
- 如何用Node编写命令行工具
0. 命令行工具 当全局安装模块之后,我们可以在控制台下执行指定的命令来运行操作,如果npm一样.我把这样的模块称之为命令行工具模块(如理解有偏颇,欢迎指正) 1.用Node编写命令行工具 在Node ...
- Awesome C/C++
Awesome C/C++ A curated list of awesome C/C++ frameworks, libraries, resources, and shiny things. In ...
- Yii2 捕获错误日志
在技术开发中,捕获程序框架错误,是非常必要的一件事情,我们公司使用Yii2框架,简单说下Yii2的错误捕获处理 Yii2 web应用 1 配置如下 其中errorHandler就是错误处理配置,执行E ...
- awesome cpp
https://github.com/fffaraz/awesome-cpp Awesome C/C++ A curated list of awesome C/C++ frameworks, lib ...
- JavaScript(五):函数(闭包,eval)
1.函数的申明:三种方法: function命令 函数表达式:变量赋值 Function构造函数 //method 1: function命令 function test(){ console.log ...
- docsis cm 上线过程(bigwhite)
扫描与同步下行(SYNC消息) 获取上行参数(UCD消息.MAP消息) 通过测距完成时间偏移等的调整(RNG消息) 设备类型鉴定(可选,DCI消息) 建立IP通道(DHCP) 同步系统时间(TOD ...
- drozer安装使用教程(Windows)
drozer和adb一样,又不是新出的工具,本不该出了这么久还要由我这样半懂不懂的再写篇东西了.但是还是一样每次使用都得百度和筛选半天,所以记下来算给自己看.以后看到我还写些老掉牙的东西都是这个原因, ...
随机推荐
- jquery的API查看 / prepend、prependTo、append、appendTo的用法
理解jquery设计思想 记住大部分jquery API的使用 英文:http://api.jquery.com/ 中文: http://www.css88.com/jqapi-1.9/ http:/ ...
- (六)学习CSS之color属性
参考:http://www.w3school.com.cn/cssref/pr_text_color.asp color 属性规定文本的颜色. 这个属性设置了一个元素的前景色(在 HTML 表现中,就 ...
- 根据IP地址查询所在地
using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Tex ...
- The type or namespace name '****' could not be found (are you missing a using directive or an assembly reference
错误的提升内容:
- Ajax异步请求-简单模版
<script type="text/javascript"> window.onload = function () { document.getElementByI ...
- Web---JSTL(Java标准标签库)-Core核心标签库、I18N国际化、函数库
前面为JSTL中的常用EL函数,后面的为具体演示实例! JSTL简介: JSTL(Java Standard Tag Library) –Java标准标签库. SUN公司制定的一套标准标签库的规范. ...
- Linux与Windows的8个不同
(整理来自网络) 对刚刚接触Linux的人来说,很容易从windows的观念去理解Linux系统.今天扒一扒Win和Linux之间常见的8个区别. 一.Linux终端输入密码不回显字符 用户的密码在L ...
- 把方法转json在前台输出
在JSON中,有两种结构:对象和数组. 1. 一个对象以“{”(左括号)开始,“}”(右括号)结束.每个“名称”后跟一个“:”(冒号):“‘名称/值’ 对”之间运用 “,”(逗号)分隔. 名称用引号括 ...
- grails2.3.11第二课
第二课主要介绍grails相关插件的使用,这是敏捷开发所必需的途径. 可以把grails的插件看作是grails正常项目的迷你型,因为看插件的源码,它的目录结构和正常项目相差无几. 官方开源插件地址 ...
- leetcode@ [279]Perfect Squares
https://leetcode.com/problems/perfect-squares/ Given a positive integer n, find the least number of ...