zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    USACO第三道题
    uva350 PseudoRandom Numbers
    uva10879 Code Refactoring
    Scrum 冲刺第一篇 晨曦
    WC.exe 晨曦
    [LeetCode 126] 单词梯II(Word Ladder II)
    [LeetCode 129] 根节点到叶子节点数字求和(Sum Root to Leaf Numbers)
    [LeetCode 125] 验证回文(Valid Palindrome)
    [LeetCode 123] 买入与卖出股票的最佳时机III(Best Time to Buy and Sell Stock III)
    [LeetCode 124] 二叉树最大路径和(Binary Tree Maximum Path Sum)
  • 原文地址:https://www.cnblogs.com/chunguang/p/5642941.html
Copyright © 2011-2022 走看看