This commit is contained in:
2021-09-29 10:29:31 +08:00
parent 509f7eb89c
commit 089117ca85
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ class Gii
$this->input = $input; $this->input = $input;
$this->db = $db; $this->db = $db;
$make = $this->input->getArgument('make'); $make = $this->input->getArgument('action');
if (empty($make)) { if (empty($make)) {
throw new Exception('构建类型不能为空~'); throw new Exception('构建类型不能为空~');
} }
+2
View File
@@ -13,6 +13,7 @@ use Kiri\Exception\NotFindClassException;
use Kiri\Kiri; use Kiri\Kiri;
use ReflectionException; use ReflectionException;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
@@ -35,6 +36,7 @@ class GiiCommand extends Command
protected function configure() protected function configure()
{ {
$this->setName('sw:gii') $this->setName('sw:gii')
->addArgument('action',InputArgument::REQUIRED)
->setDescription('./snowflake sw:gii make=model|controller|task|interceptor|limits|middleware name=xxxx'); ->setDescription('./snowflake sw:gii make=model|controller|task|interceptor|limits|middleware name=xxxx');
} }