argument('id') ?? $this->choice('Plugin', Plugin::pluck('name', 'id')->toArray()); $plugin = Plugin::find($id); if (!$plugin) { $this->error('Plugin does not exist!'); return; } if (!$plugin->isUpdateAvailable()) { $this->error("Plugin doesn't need updating!"); return; } Plugins::updatePlugin($plugin); $this->info('Plugin updated.'); } }