ewci/cli-make-command 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ewci/cli-make-command

Composer 安装命令:

composer require ewci/cli-make-command

包简介

Package to help making the command class, controller class, filter class, entity class, model class

README 文档

README

Latest Stable Version Total Downloads License

CodeIgniter CLI Make Command is based on CodeIgniter version 4. It will help you generate template files (Command line, Controller, Filter, Entity, Model) more quickly when developing projects with CodeIgniter4.

This is an idea got from Laravel Framework as well.

Install

Prerequisites

  1. CodeIgniter Framework 4.*
  2. Composer

Composer Install

composer require ewci/cli-make-command

Use Library

Open Terminal in Mac/Linux or go to Run > “cmd” in Windows and navigate to CodeIgniter4 project’s root:

php spark list

Now, if you see the following message, the installation is successful.

make
  make:command       Create a new command class.
  make:controller    Create a new controller class.
  make:entity        Create a new entity class.
  make:filter        Create a new filter class.
  make:model         Create a new model class.

Guide

make:command

Create a new command file.

  • Use

    php spark make:command [class_name] [options]
    
  • Description:

    Create a new command file.
    
  • Arguments:

    1. class_name : The command name.
  • Options:

    --command   The command name to run in spark. Defaults to command:name.
    --group     The group/namespace of the command. Defaults to CodeIgniter for basic commands, and Generators for generator commands.
    --type      The type of command, whether a basic command or a generator command. Defaults to basic
    -n          Set controller namespace
    --force     Set this flag to overwrite existing files on destination.
    

make:controller

Create a new controller file.

  • Use

    php spark make:controller [class_name] [options]
    
  • Description:

    Create a new controller file.
    
  • Arguments:

    1. class_name : The controller name.
  • Options:

    --restful   Extends from a RESTful resource.
    -n          Set controller namespace
    --force     Set this flag to overwrite existing files on destination.
    

make:entity

Create a new entity file.

  • Use

    php spark make:entity [class_name] [options]
    
  • Description:

    Create a new entity file.
    
  • Arguments:

    1. class_name : The entity name
  • Options:

    -n          Set entity namespace
    --force     Set this flag to overwrite existing files on destination.
    

make:model

Create a new model file.

  • Use

    php spark make:model [class_name] [options]
    
  • Description:

    Create a new model file.
    
  • Arguments:

    1. class_name : The model name
  • Options:

    --dbgroup   Database group to use. Defaults to default.
    --entity    Set this flag to use an entity class as the return type.'
    --table     Supply a different table name. Defaults to the pluralized class name.'
    -n          Set model namespace
    --force     Set this flag to overwrite existing files on destination.
    

make:filter

Create a new filter file.

  • Use

    php spark make:filter [class_name] [options]
    
  • Description:

    Create a new filter file.
    
  • Arguments:

    1. class_name : The filter name
  • Options:

    -n          Set filter namespace
    --force     Set this flag to overwrite existing files on destination.
    

Enjoy!

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固