/** * Execute the command. * * @return void */ public function handle() { $namespace = $this->argument('namespace'); $templateHelper = new TemplatesHelper(); $templateData = $templateHelper->getTemplate('AppBaseController', 'Controller'); $templateData = str_replace('$$BASE_NAMESPACE$$', $namespace, $templateData); $fileName = "AppBaseController.php"; $filePath = __DIR__ . "/../../Controller/"; $fileHelper = new FileHelper(); $fileHelper->writeFile($filePath . $fileName, $templateData); $this->comment('AppBaseController generated'); $this->info($fileName); }