public function fire()
{
$path = str_replace('\\', '/', $this->getDestinationFilePath());
if (!$this->laravel['files']->isDirectory($dir = dirname($path))) {
$this->laravel['files']->makeDirectory($dir, 0777, true);
}
$contents = $this->getTemplateContents();
try {
with(new FileGenerator($path, $contents))->generate();
$this->info("Created : {$path}");
} catch (FileAlreadyExistException $e) {
$this->error("File : {$path} already exists.");
}
}