modified 初始化自动构建

This commit is contained in:
zhaoxiang 2021-02-24 16:22:12 +08:00
parent 526d728a4f
commit 5ce8c3feaa

View File

@ -36,20 +36,20 @@ class AutoBuildFile extends Command {
$output->comment('Please choose module (1:admin;2:api, default 1):'); $output->comment('Please choose module (1:admin;2:api, default 1):');
$input = trim(fgets(fopen('php://stdin', 'r'))); $input = trim(fgets(fopen('php://stdin', 'r')));
$dsn['module'] = strlen($input) ? $input : 1; $dsn['module'] = strlen($input) ? $input : 1;
}
$output->comment('Do you need to build a menu? 1 or 0 (default 1):'); $output->comment('Do you need to build a menu? 1 or 0 (default 1):');
$input = trim(fgets(fopen('php://stdin', 'r')));
$dsn['menu'] = strlen($input) ? $input : 1;
if ($dsn['menu']) {
$output->comment('Please input menu fid (default 0):');
$input = trim(fgets(fopen('php://stdin', 'r'))); $input = trim(fgets(fopen('php://stdin', 'r')));
$dsn['fid'] = strlen($input) ? $input : 0; $dsn['menu'] = strlen($input) ? $input : 1;
$output->comment('Do you need to create a route? 1 or 0 (default 0):'); if ($dsn['menu']) {
$input = trim(fgets(fopen('php://stdin', 'r'))); $output->comment('Please input menu fid (default 0):');
$dsn['route'] = strlen($input) ? $input : 0; $input = trim(fgets(fopen('php://stdin', 'r')));
$dsn['fid'] = strlen($input) ? $input : 0;
$output->comment('Do you need to create a route? 1 or 0 (default 0):');
$input = trim(fgets(fopen('php://stdin', 'r')));
$dsn['route'] = strlen($input) ? $input : 0;
}
} }
$output->comment('Do you need to build a model? 1 or 0 (default 0):'); $output->comment('Do you need to build a model? 1 or 0 (default 0):');