PHP code example of liuwave / command

1. Go to this page and download the library: Download liuwave/command library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

liuwave / command example snippets




namespace {%namespace%};

use think\Controller;

class {%className%} extends Controller
{
    //
}




namespace {%namespace%};

use think\Model;

class {%className%} extends Model
{
    //

}




namespace {%namespace%};

use think\Validate;

class {%className%} extends Validate
{
    /**
     * 定义验证规则
     * 格式:'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [];
    
    /**
     * 定义错误信息
     * 格式:'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [];
}

`

php think make:controller index/Index [--stub plain] [--key primary_id]

php think make:model  common/User  [--stub plain] [--key primary_id]

php think make:validate   common/User  [--stub plain] [--key primary_id]