Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

update commands

Andras Bacsai194675c838f5
diff --git a/app/Console/Commands/ResourceDelete.php b/app/Console/Commands/ResourcesDelete.php
similarity index 83%
rename from app/Console/Commands/ResourceDelete.php
rename to app/Console/Commands/ResourcesDelete.php
index d0c18f5ccc..d230aa9272 100644
--- a/app/Console/Commands/ResourceDelete.php
+++ b/app/Console/Commands/ResourcesDelete.php
@@ -10,14 +10,14 @@ use Illuminate\Console\Command;
use function Laravel\Prompts\confirm;
use function Laravel\Prompts\select;
-class ResourceDelete extends Command
+class ResourcesDelete extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
- protected $signature = 'resource:delete';
+ protected $signature = 'resources:delete';
/**
* The console command description.
@@ -46,6 +46,10 @@ class ResourceDelete extends Command
private function deleteApplication()
{
$applications = Application::all();
+ if ($applications->count() === 0) {
+ $this->error('There are no applications to delete.');
+ return;
+ }
$application = select(
'What application do you want to delete?',
$applications->pluck('name')->toArray(),
@@ -60,6 +64,10 @@ class ResourceDelete extends Command
private function deleteDatabase()
{
$databases = StandalonePostgresql::all();
+ if ($databases->count() === 0) {
+ $this->error('There are no databases to delete.');
+ return;
+ }
$database = select(
'What database do you want to delete?',
$databases->pluck('name')->toArray(),
@@ -74,6 +82,10 @@ class ResourceDelete extends Command
private function deleteService()
{
$services = Service::all();
+ if ($services->count() === 0) {
+ $this->error('There are no services to delete.');
+ return;
+ }
$service = select(
'What service do you want to delete?',
$services->pluck('name')->toArray(),
diff --git a/app/Console/Commands/ResetRootPassword.php b/app/Console/Commands/UsersResetRoot.php
similarity index 92%
rename from app/Console/Commands/ResetRootPassword.php
rename to app/Console/Commands/UsersResetRoot.php
index 61e0eb3093..d72ef07d9c 100644
--- a/app/Console/Commands/ResetRootPassword.php
+++ b/app/Console/Commands/UsersResetRoot.php
@@ -8,14 +8,14 @@ use Illuminate\Support\Facades\Hash;
use function Laravel\Prompts\password;
-class ResetRootPassword extends Command
+class UsersResetRoot extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
- protected $signature = 'app:reset-root-password';
+ protected $signature = 'users:reset-root';
/**
* The console command description.