diff --git a/app/Console/Commands/Plugin/ComposerPluginsCommand.php b/app/Console/Commands/Plugin/ComposerPluginsCommand.php index 33319e8ce..f99ad6924 100644 --- a/app/Console/Commands/Plugin/ComposerPluginsCommand.php +++ b/app/Console/Commands/Plugin/ComposerPluginsCommand.php @@ -11,7 +11,7 @@ class ComposerPluginsCommand extends Command { protected $signature = 'p:plugin:composer'; - protected $description = 'Runs composer require on all installed plugins.'; + protected $description = 'Runs "composer require" on all installed plugins.'; public function handle(): void { diff --git a/app/Console/Commands/Plugin/InstallPluginCommand.php b/app/Console/Commands/Plugin/InstallPluginCommand.php index 7348e4c57..a448db58e 100644 --- a/app/Console/Commands/Plugin/InstallPluginCommand.php +++ b/app/Console/Commands/Plugin/InstallPluginCommand.php @@ -8,14 +8,16 @@ use Illuminate\Console\Command; class InstallPluginCommand extends Command { - protected $signature = 'p:plugin:install {id}'; + protected $signature = 'p:plugin:install {--id=}'; protected $description = 'Installs a plugin'; public function handle(): void { + $id = $this->option('id') ?? $this->choice('Plugin', Plugin::pluck('name', 'id')->toArray()); + /** @var ?Plugin $plugin */ - $plugin = Plugin::where('id', $this->argument('id'))->first(); + $plugin = Plugin::where('id', $id)->first(); if (!$plugin) { $this->error('Plugin does not exist!'); diff --git a/app/Console/Commands/Plugin/UpdatePluginCommand.php b/app/Console/Commands/Plugin/UpdatePluginCommand.php index 16fa40eb7..09c5ac8ce 100644 --- a/app/Console/Commands/Plugin/UpdatePluginCommand.php +++ b/app/Console/Commands/Plugin/UpdatePluginCommand.php @@ -8,14 +8,16 @@ use Illuminate\Console\Command; class UpdatePluginCommand extends Command { - protected $signature = 'p:plugin:update {id}'; + protected $signature = 'p:plugin:update {--id=}'; protected $description = 'Updates a plugin'; public function handle(): void { + $id = $this->option('id') ?? $this->choice('Plugin', Plugin::pluck('name', 'id')->toArray()); + /** @var ?Plugin $plugin */ - $plugin = Plugin::where('id', $this->argument('id'))->first(); + $plugin = Plugin::where('id', $id)->first(); if (!$plugin) { $this->error('Plugin does not exist!');