From 8229395e6d6159c3bbc78dd38fa8cb20837e08de Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 12 Dec 2021 02:41:31 +0800 Subject: [PATCH] 1 --- kiri-gii/GiiCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiri-gii/GiiCommand.php b/kiri-gii/GiiCommand.php index 696cf8a7..706933cc 100644 --- a/kiri-gii/GiiCommand.php +++ b/kiri-gii/GiiCommand.php @@ -32,9 +32,9 @@ class GiiCommand extends Command protected function configure() { $this->setName('sw:gii') - ->addArgument('action', InputArgument::REQUIRED) - ->addArgument('name', InputArgument::OPTIONAL) - ->addArgument('databases', InputArgument::OPTIONAL) + ->addOption('make', InputArgument::OPTIONAL) + ->addOption('name', InputArgument::OPTIONAL) + ->addOption('databases', InputArgument::OPTIONAL) ->setDescription('./snowflake sw:gii make=model|controller|task|interceptor|limits|middleware name=xxxx'); } @@ -57,7 +57,7 @@ class GiiCommand extends Command return 1; } - $action = $input->getArgument('action'); + $action = $input->getArgument('make'); if (!in_array($action, ['model', 'controller'])) { $gii->run(null, $input); return 1;