diff --git a/kiri-gii/Gii.php b/kiri-gii/Gii.php index 1ba800ca..cb50f72b 100644 --- a/kiri-gii/Gii.php +++ b/kiri-gii/Gii.php @@ -70,7 +70,7 @@ class Gii $this->input = $input; $this->db = $db; - $make = $this->input->getArgument('make'); + $make = $this->input->getArgument('action'); if (empty($make)) { throw new Exception('构建类型不能为空~'); } diff --git a/kiri-gii/GiiCommand.php b/kiri-gii/GiiCommand.php index ea3ad739..3d9d9cde 100644 --- a/kiri-gii/GiiCommand.php +++ b/kiri-gii/GiiCommand.php @@ -13,6 +13,7 @@ use Kiri\Exception\NotFindClassException; use Kiri\Kiri; use ReflectionException; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -35,6 +36,7 @@ class GiiCommand extends Command protected function configure() { $this->setName('sw:gii') + ->addArgument('action',InputArgument::REQUIRED) ->setDescription('./snowflake sw:gii make=model|controller|task|interceptor|limits|middleware name=xxxx'); }