From 089117ca85ec002251daea5e587e6e77fe7d5903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 29 Sep 2021 10:29:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-gii/Gii.php | 2 +- kiri-gii/GiiCommand.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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'); }