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