1 | <?php |
||
11 | class MigrateResetCommand extends Command |
||
12 | { |
||
13 | use MigrationLoaderTrait; |
||
14 | |||
15 | /** |
||
16 | * The console command name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $name = 'module:migrate-reset'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Reset the modules migrations.'; |
||
28 | |||
29 | /** |
||
30 | * @var \Nwidart\Modules\Contracts\RepositoryInterface |
||
31 | */ |
||
32 | protected $module; |
||
33 | |||
34 | /** |
||
35 | * Execute the console command. |
||
36 | */ |
||
37 | public function handle(): void |
||
51 | |||
52 | /** |
||
53 | * Rollback migration from the specified module. |
||
54 | * |
||
55 | * @param $module |
||
56 | */ |
||
57 | public function resetOne($module): void |
||
72 | |||
73 | /** |
||
74 | * Rollback migration from the all the specified modules. |
||
75 | * |
||
76 | * @param array $modules |
||
77 | */ |
||
78 | private function resetMany(array $modules): void |
||
93 | |||
94 | /** |
||
95 | * Get the console command arguments. |
||
96 | * |
||
97 | * @return array |
||
98 | */ |
||
99 | 99 | protected function getArguments() |
|
105 | |||
106 | /** |
||
107 | * Get the console command options. |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | 99 | protected function getOptions() |
|
120 | } |
||
121 |