Skip to content

Commit

Permalink
add reinstall class command
Browse files Browse the repository at this point in the history
  • Loading branch information
reziamini committed Mar 9, 2021
1 parent 0004461 commit 33bfdb2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Commands/Actions/Reinstall.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace EasyPanel\Commands\Actions;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;

class Reinstall extends Command
{

protected $signature = 'panel:reinstall';
protected $description = 'Reinstall whole the package';

public function handle()
{
$status = $this->confirm("Do you really want to reinstall the panel ? (All components will be deleted)", true);
if($status) {
Artisan::call("panel:uninstall", [
'--force' => true,
]);

Artisan::call("panel:install");

$this->info("The package was reinstalled!");
return;
}

$this->info("The process was canceled");
}
}

0 comments on commit 33bfdb2

Please sign in to comment.