-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Laravel Prompts, PERSCOM PHP SDK and local config instead o…
…f database/models. (#1)
- Loading branch information
1 parent
c0efd62
commit 9b86f6d
Showing
27 changed files
with
4,813 additions
and
5,986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Commands; | ||
|
||
use App\Repositories\ConfigRepository; | ||
use App\Repositories\PerscomRepository; | ||
use LaravelZero\Framework\Commands\Command as BaseCommand; | ||
|
||
abstract class Command extends BaseCommand | ||
{ | ||
protected $aliases = []; | ||
|
||
protected ConfigRepository $config; | ||
|
||
protected PerscomRepository $perscom; | ||
|
||
public function __construct(ConfigRepository $config, PerscomRepository $perscom) | ||
{ | ||
parent::__construct(); | ||
|
||
$this->config = $config; | ||
$this->perscom = $perscom; | ||
|
||
$this->setAliases($this->aliases); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Commands; | ||
|
||
use function Laravel\Prompts\info; | ||
|
||
class UninstallCommand extends Command | ||
{ | ||
protected $signature = 'uninstall'; | ||
|
||
protected $description = 'Uninstalls the PERSCOM CLI and removes all stored credentials.'; | ||
|
||
public function handle() | ||
{ | ||
$this->config->flush(); | ||
|
||
info('<fg=green>==></> <options=bold>The PERSCOM CLI has been successfully uninstalled.'); | ||
|
||
return Command::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.