Skip to content

Commit d95d93c

Browse files
committed
Finishing up the ClearSettings command.
1 parent 91a0719 commit d95d93c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Commands/ClearSettings.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace App\Commands;
3+
namespace CodeIgniter\Settings\Commands;
44

55
use CodeIgniter\CLI\BaseCommand;
66
use CodeIgniter\CLI\CLI;
@@ -13,9 +13,12 @@ class ClearSettings extends BaseCommand
1313

1414
public function run(array $params)
1515
{
16-
if (! CLI::prompt('This will delete all settings from the database. Are you sure you want to continue?', ['y', 'n'], 'required') === 'y') {
16+
if (CLI::prompt('This will delete all settings from the database. Are you sure you want to continue?', ['y', 'n'], 'required') === 'y') {
1717
return;
1818
}
1919

20+
service('setting')->flush();
21+
22+
CLI::write('Settings cleared from the database.', 'green');
2023
}
2124
}

0 commit comments

Comments
 (0)