argument('module'); $controllerName = $this->argument('controller'); $modulePath = modules_path($moduleName); if (! is_dir($modulePath)) { $this->error("Module [{$moduleName}] does not exist."); return; } $controllerPath = "App\\Modules\\{$moduleName}\\Controllers\\{$controllerName}"; Artisan::call('make:controller', [ 'name' => $controllerPath, ]); $this->info("Controller [{$controllerName}] created successfully in module [{$moduleName}]."); } }