tp5 new module

The tp5 module automatically generates

1build.php to configure the directory to be generated

 

<?php
// +-------------------------------- --------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +------------------------------------------------------------ -----------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +--- -------------------------------------------------- -----------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +--------- -------------------------------------------------- -----------
// | Author: liu21st <[email protected]>
// +------------- ---------------------------------------------------------

return [
    / / Generate application public files
    '__file__' => ['common.php', 'config.php', 'database.php'],

    // Define the automatic generation of the demo module (generated according to the actual defined file name)
    'demo' => [
        '__file__ ' => ['common.php'],
        '__dir__' => ['behavior', 'controller', 'model', 'view'],
        'controller' => ['Index', 'Test', 'UserType '],
        'model' => ['User', 'UserType'],
        'view' => ['index/index'],
    ],
    // other more module definitions
    'admin' => [
        '__file__' => ['common.php'],
        '__dir__' => ['behavior','controller', 'model', 'view'],
        'controller' => ['Index', 'Test', 'UserType'],
        'model'      => ['User', 'UserType'],
        'view'       => ['index/index'],
    ],
];

2: Open phpstudy====Other options menu====Other advanced applications =====PHP composer open the command line, switch the directory to the root directory of our project and

run php think build --config build. php
shows successful just fine

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324712253&siteId=291194637