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 1515use Native \Laravel \Commands \LoadStartupConfigurationCommand ;
1616use Native \Laravel \Commands \MigrateCommand ;
1717use Native \Laravel \Commands \SeedDatabaseCommand ;
18+ use Native \Laravel \Commands \WipeDatabaseCommand ;
1819use Native \Laravel \Contracts \ChildProcess as ChildProcessContract ;
1920use Native \Laravel \Contracts \GlobalShortcut as GlobalShortcutContract ;
2021use Native \Laravel \Contracts \PowerMonitor as PowerMonitorContract ;
@@ -42,6 +43,7 @@ public function configurePackage(Package $package): void
4243 FreshCommand::class,
4344 MigrateCommand::class,
4445 SeedDatabaseCommand::class,
46+ WipeDatabaseCommand::class,
4547 ])
4648 ->hasConfigFile ()
4749 ->hasRoute ('api ' )
You can’t perform that action at this time.
0 commit comments