diff --git a/extend/catcher/command/CreateModuleCommand.php b/extend/catcher/command/CreateModuleCommand.php index 00788df..f2fad2a 100644 --- a/extend/catcher/command/CreateModuleCommand.php +++ b/extend/catcher/command/CreateModuleCommand.php @@ -78,38 +78,9 @@ class CreateModuleCommand extends Command } $this->output->info('🎉 create controller successfully'); - $this->createView($controllers); $this->createRequest($controllers); } - - - protected function createView($controllers) - { - $viewPath = $this->moduleDir . 'view' . DIRECTORY_SEPARATOR; - - CatchAdmin::makeDirectory($viewPath); - - $default = ['index.', 'create.', 'edit.']; - - $viewSuffix = config('view.view_suffix'); - - if (count($controllers) === 1) { - foreach ($default as $v) { - file_put_contents($viewPath . $v .$viewSuffix, ''); - } - } else { - foreach ($controllers as $controller) { - CatchAdmin::makeDirectory($viewPath . ucwords($controller)); - foreach ($default as $v) { - file_put_contents($viewPath . ucwords($controller) . DIRECTORY_SEPARATOR .$v . $viewSuffix, ''); - } - } - } - - $this->output->info('🎉 create view successfully'); - } - protected function createRequest($controllers) { $requestPath = $this->moduleDir . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR; diff --git a/extend/catcher/command/ModelGeneratorCommand.php b/extend/catcher/command/ModelGeneratorCommand.php index 92e062c..4cc2d5b 100644 --- a/extend/catcher/command/ModelGeneratorCommand.php +++ b/extend/catcher/command/ModelGeneratorCommand.php @@ -16,8 +16,8 @@ class ModelGeneratorCommand extends Command protected function configure() { $this->setName('create:model') - ->addArgument('model', Argument::REQUIRED, 'model name') ->addArgument('module', Argument::REQUIRED, 'module name') + ->addArgument('model', Argument::REQUIRED, 'model name') ->setDescription('create model'); }