public function publish()
{
if (!$this->console instanceof Command) {
$message = "The 'console' property must instance of \\Illuminate\\Console\\Command.";
throw new \RuntimeException($message);
}
if (!$this->getFilesystem()->isDirectory($sourcePath = $this->getSourcePath())) {
return;
}
if (!$this->getFilesystem()->isDirectory($destinationPath = $this->getDestinationPath())) {
$this->getFilesystem()->makeDirectory($destinationPath, 0775, true);
}
if ($this->getFilesystem()->copyDirectory($sourcePath, $destinationPath)) {
if ($this->showMessage === true) {
$this->console->line("<info>Published</info>: {$this->module->getStudlyName()}");
}
} else {
$this->console->error($this->error);
}
}