/home/techb158/immovalet.com/platform/packages/theme/src/Commands
Edit: /home/techb158/immovalet.com/platform/packages/theme/src/Commands/ThemeAssetsPublishCommand.php (1745B)
themeService = $themeService;
}
/**
* Execute the console command.
*
* @return bool
*/
public function handle()
{
if ($this->option('name') && !preg_match('/^[a-z0-9\-]+$/i', $this->option('name'))) {
$this->error('Only alphabetic characters are allowed.');
return 1;
}
if ($this->option('name') && !File::isDirectory($this->getPath())) {
$this->error('Theme "' . $this->getTheme() . '" is not exists.');
return 1;
}
$result = $this->themeService->publishAssets($this->option('name'));
if ($result['error']) {
$this->error($result['message']);
return 1;
}
$this->info($result['message']);
return 0;
}
}