芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/invoicer.pulsehost.co.uk/app/Console/Commands/CreateTemplateCommand.php
argument('name'); $type = $this->option('type'); if (! $type) { $type = $this->choice('Create a template for?', ['invoice', 'estimate']); } if (Storage::disk('views')->exists("/app/pdf/{$type}/{$templateName}.blade.php")) { $this->info('Template with given name already exists.'); return 0; } Storage::disk('views')->copy("/app/pdf/{$type}/{$type}1.blade.php", "/app/pdf/{$type}/{$templateName}.blade.php"); copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png")); copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png")); $path = resource_path("views/app/pdf/{$type}/{$templateName}.blade.php"); $type = ucfirst($type); $this->info("{$type} Template created successfully at ".$path); return 0; } }