芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/livewire/livewire/src/Commands/DeleteCommand.php
parser = new ComponentParser( config('livewire.class_namespace'), config('livewire.view_path'), $this->argument('name') ); if (! $force = $this->option('force')) { $shouldContinue = $this->confirm( "
Are you sure you want to delete the following files?>\n\n{$this->parser->relativeClassPath()}\n{$this->parser->relativeViewPath()}\n" ); if (! $shouldContinue) { return; } } $inline = $this->option('inline'); $class = $this->removeClass($force); if (! $inline) $view = $this->removeView($force); $this->refreshComponentAutodiscovery(); $this->line("
COMPONENT DESTROYED > 🦖💫\n"); $class && $this->line("
CLASS:> {$this->parser->relativeClassPath()}"); if (! $inline) $view && $this->line("
VIEW:> {$this->parser->relativeViewPath()}"); } protected function removeClass($force = false) { $classPath = $this->parser->classPath(); if (! File::exists($classPath) && ! $force) { $this->line("
WHOOPS-IE-TOOTLES > 😳 \n"); $this->line("
Class doesn't exist:> {$this->parser->relativeClassPath()}"); return false; } File::delete($classPath); return $classPath; } protected function removeView($force = false) { $viewPath = $this->parser->viewPath(); if (! File::exists($viewPath) && ! $force) { $this->line("
View doesn't exist:> {$this->parser->relativeViewPath()}"); return false; } File::delete($viewPath); return $viewPath; } }