File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Native \Laravel \Commands ;
4
+
5
+ use Illuminate \Database \Console \WipeCommand as BaseWipeCommand ;
6
+ use Native \Laravel \NativeServiceProvider ;
7
+
8
+ class WipeDatabaseCommand extends BaseWipeCommand
9
+ {
10
+ protected $ name = 'native:db:wipe ' ;
11
+
12
+ protected $ description = 'Wipe the database in the NativePHP development environment ' ;
13
+
14
+ public function handle ()
15
+ {
16
+ (new NativeServiceProvider ($ this ->laravel ))->rewriteDatabase ();
17
+
18
+ return parent ::handle ();
19
+ }
20
+ }
Original file line number Diff line number Diff line change 15
15
use Native \Laravel \Commands \LoadStartupConfigurationCommand ;
16
16
use Native \Laravel \Commands \MigrateCommand ;
17
17
use Native \Laravel \Commands \SeedDatabaseCommand ;
18
+ use Native \Laravel \Commands \WipeDatabaseCommand ;
18
19
use Native \Laravel \Contracts \ChildProcess as ChildProcessContract ;
19
20
use Native \Laravel \Contracts \GlobalShortcut as GlobalShortcutContract ;
20
21
use Native \Laravel \Contracts \PowerMonitor as PowerMonitorContract ;
@@ -42,6 +43,7 @@ public function configurePackage(Package $package): void
42
43
FreshCommand::class,
43
44
MigrateCommand::class,
44
45
SeedDatabaseCommand::class,
46
+ WipeDatabaseCommand::class,
45
47
])
46
48
->hasConfigFile ()
47
49
->hasRoute ('api ' )
You can’t perform that action at this time.
0 commit comments