update commands
This commit is contained in:
		
							parent
							
								
									75862ca8de
								
							
						
					
					
						commit
						194675c838
					
				| @ -10,14 +10,14 @@ use Illuminate\Console\Command; | |||||||
| use function Laravel\Prompts\confirm; | use function Laravel\Prompts\confirm; | ||||||
| use function Laravel\Prompts\select; | use function Laravel\Prompts\select; | ||||||
| 
 | 
 | ||||||
| class ResourceDelete extends Command | class ResourcesDelete extends Command | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * The name and signature of the console command. |      * The name and signature of the console command. | ||||||
|      * |      * | ||||||
|      * @var string |      * @var string | ||||||
|      */ |      */ | ||||||
|     protected $signature = 'resource:delete'; |     protected $signature = 'resources:delete'; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * The console command description. |      * The console command description. | ||||||
| @ -46,6 +46,10 @@ class ResourceDelete extends Command | |||||||
|     private function deleteApplication() |     private function deleteApplication() | ||||||
|     { |     { | ||||||
|         $applications = Application::all(); |         $applications = Application::all(); | ||||||
|  |         if ($applications->count() === 0) { | ||||||
|  |             $this->error('There are no applications to delete.'); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         $application = select( |         $application = select( | ||||||
|             'What application do you want to delete?', |             'What application do you want to delete?', | ||||||
|             $applications->pluck('name')->toArray(), |             $applications->pluck('name')->toArray(), | ||||||
| @ -60,6 +64,10 @@ class ResourceDelete extends Command | |||||||
|     private function deleteDatabase() |     private function deleteDatabase() | ||||||
|     { |     { | ||||||
|         $databases = StandalonePostgresql::all(); |         $databases = StandalonePostgresql::all(); | ||||||
|  |         if ($databases->count() === 0) { | ||||||
|  |             $this->error('There are no databases to delete.'); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         $database = select( |         $database = select( | ||||||
|             'What database do you want to delete?', |             'What database do you want to delete?', | ||||||
|             $databases->pluck('name')->toArray(), |             $databases->pluck('name')->toArray(), | ||||||
| @ -74,6 +82,10 @@ class ResourceDelete extends Command | |||||||
|     private function deleteService() |     private function deleteService() | ||||||
|     { |     { | ||||||
|         $services = Service::all(); |         $services = Service::all(); | ||||||
|  |         if ($services->count() === 0) { | ||||||
|  |             $this->error('There are no services to delete.'); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         $service = select( |         $service = select( | ||||||
|             'What service do you want to delete?', |             'What service do you want to delete?', | ||||||
|             $services->pluck('name')->toArray(), |             $services->pluck('name')->toArray(), | ||||||
| @ -8,14 +8,14 @@ use Illuminate\Support\Facades\Hash; | |||||||
| 
 | 
 | ||||||
| use function Laravel\Prompts\password; | use function Laravel\Prompts\password; | ||||||
| 
 | 
 | ||||||
| class ResetRootPassword extends Command | class UsersResetRoot extends Command | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * The name and signature of the console command. |      * The name and signature of the console command. | ||||||
|      * |      * | ||||||
|      * @var string |      * @var string | ||||||
|      */ |      */ | ||||||
|     protected $signature = 'app:reset-root-password'; |     protected $signature = 'users:reset-root'; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * The console command description. |      * The console command description. | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user