/** * Get destination path. * * @return string */ public function getDestinationPath() { if ($this->path) { return $this->path; } return $this->repository->getModulePath($this->getModuleName()); }
/** * Generate the files. */ public function generateFiles() { foreach ($this->getFiles() as $stub => $file) { $path = $this->workbench->getModulePath($this->getName()) . $file; if (!$this->filesystem->isDirectory($dir = dirname($path))) { $this->filesystem->makeDirectory($dir, 0775, true); } $this->filesystem->put($path, $this->getStubContents($stub)); $this->console->info("Created : {$path}"); } }