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.

时间: 2024-11-08 20:54:25

CLI Console的相关文章

Huawei E1750 Asterisk

http://wiki.e1550.mobi/doku.php?id=installation https://wiki.asterisk.org/wiki/display/AST/Mobile+Channel+Requirements /usr/sbin/asterisk -vvvgc CLI>module load chan_dongle.so CLI>module unload chan_dongle.so CLI>module reload chan_dongle.so Hell

Presto源码解读1-客户端提交查询-吕信(原创)

客户端请求处理就是接收交互式/非交互式命令,通过httpclient发送到服务器(coordinator),客户端通过httpclient更新执行状态打印给用户看,最后收集结果打印给用户.启动Presto cli 客户端的代码文件为: presto-cli\src\main\java\com\facebook\presto\cli\Presto.java public final class Presto { private Presto() {} public static void main

Phalcon 之命令行应用(Command Line Applications)

CLI应用即是运行在命令行窗体上的应用. 主要用来实现后台任务, 命令行工具等. 结构(Structure)? 最小结构的CLI程序如下: app/config/config.php app/tasks/MainTask.php app/cli.php <– 启动文件 创建引导(Creating a Bootstrap)? 普通的MVC程序中, 启动文件用来启动整个应用. 和web应用不同, 此处应用中我们使用cli.php来作为启动文件. 下面是一个简单的启动文件示例: <?php use

当Azure遇上Docker

容器技术现在发展的如火如荼,包括微软也会在下一代操作系统中提供原生支持,个人认为微软的优势在于其拥有成熟的集群工作环境(Nano Server)以及成熟的管理平台(System Center),除此之外还有一系列围绕容器的生态链,比如自动化(PowerShell DSC),比如监控,比如生命周期管理等等.当然目前如果想在Win平台上体验容器的话,除了Docker提供的boot2docker,最"土"的办法就是在Hyper-V里创建一台Linux虚拟机,然后去部署并使用Docker环境.

Yii2 捕获错误日志

在技术开发中,捕获程序框架错误,是非常必要的一件事情,我们公司使用Yii2框架,简单说下Yii2的错误捕获处理 Yii2 web应用 1 配置如下 其中errorHandler就是错误处理配置,执行ErrorController的actionError 'components' => [     "urlManager" => require (__DIR__ . '/router.php'),     'errorHandler' => [         'err

PatentTips - Method to manage memory in a platform with virtual machines

BACKGROUND INFORMATION Various mechanisms exist for managing memory in a virtual machine environment. A virtual machine platform typically executes an underlying layer of software called a virtual machine monitor (VMM) which hosts one to many operati

docsis cm 上线过程(bigwhite)

扫描与同步下行(SYNC消息) 获取上行参数(UCD消息.MAP消息)  通过测距完成时间偏移等的调整(RNG消息) 设备类型鉴定(可选,DCI消息) 建立IP通道(DHCP)  同步系统时间(TOD) 下载配置文件(TFTP) 注册(REG消息)  BPI初始化 查看docsis 的状态: # cli docsis/cmstatus 或者 # cli >>> Console, CLI version 1.0.0.5 Type 'help' for list of commands ma

JS高级(一)

1.JavaScript面向对象 面向对象三大特性 封装性 把功能封装好 继承性 多态性 面型对象优缺点 易维护.可重用.可拓展.灵活性高 性能不如面向过程 2.ES6中的类和对象 类:抽象 类模拟抽象的,泛指的,对象是具体的 对象:具体 类中的具体的某个实例[属性和方法的集合体] 对象是由属性和方法组成的 属性:事物的特征,在对象中用属性来表示(常用名词) 方法:事物的行为,在对象中用方法来表示(常用动词) 3.面向对象的思维特点: 抽取(抽象)对象共用的属性和方法组织(封装)成一个类(模板)

C++/CLI 编程——使用 for each 循环存取字符串中的字符

除 ISO/IEC C++ 中定义的3种循环语句以外,C++/CLI 还提供了for each 语句.在C++/CLI 中,for each 循环的效率比其他几种形式的循环效率更高. #include"stdafx.h" using namespace System; int main(array <System::String ^> ^args) { int vowels(0), consonants(0); String^ proverb(L"A nod is