Add --force option to 2fauth:reset-testing command

This commit is contained in:
Bubka 2024-10-29 13:52:04 +01:00
parent 235c53c4dd
commit 59db486c3c

View File

@ -14,7 +14,7 @@ class ResetTesting extends Command
* *
* @var string * @var string
*/ */
protected $signature = '2fauth:reset-testing {--no-confirm}'; protected $signature = '2fauth:reset-testing {--no-confirm} {--force}';
/** /**
* The console command description. * The console command description.
@ -47,7 +47,9 @@ public function __construct()
*/ */
public function handle() public function handle()
{ {
if (! config('2fauth.config.isTestingApp')) { $this->callSilently('config:clear');
if (! config('2fauth.config.isTestingApp') && ! $this->option('force')) {
$this->comment('2fauth:reset-testing can only run when isTestingApp option is On'); $this->comment('2fauth:reset-testing can only run when isTestingApp option is On');
return; return;