mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-08 10:39:27 +01:00
change "id" in install and update commands to argument
This commit is contained in:
parent
561aaa3ae0
commit
b0e6c51e77
@ -8,13 +8,13 @@ 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());
|
||||
$id = $this->argument('id') ?? $this->choice('Plugin', Plugin::pluck('name', 'id')->toArray());
|
||||
|
||||
/** @var ?Plugin $plugin */
|
||||
$plugin = Plugin::where('id', $id)->first();
|
||||
|
||||
@ -8,13 +8,13 @@ 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());
|
||||
$id = $this->argument('id') ?? $this->choice('Plugin', Plugin::pluck('name', 'id')->toArray());
|
||||
|
||||
/** @var ?Plugin $plugin */
|
||||
$plugin = Plugin::where('id', $id)->first();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user