1 | <?php |
||
10 | class MakeMigrationCommand extends Command |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'make:module:migration'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Create a new module migration file'; |
||
25 | |||
26 | /** |
||
27 | * Array to store the configuration details. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $container; |
||
32 | |||
33 | /** |
||
34 | * Create a new command instance. |
||
35 | * |
||
36 | * @param Filesystem $files |
||
37 | * @param Modules $module |
||
38 | */ |
||
39 | public function __construct(Filesystem $files, Modules $module) |
||
46 | |||
47 | /** |
||
48 | * Execute the console command. |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function fire() |
||
69 | |||
70 | /** |
||
71 | * Create a new migration file. |
||
72 | * |
||
73 | * @return int |
||
74 | */ |
||
75 | protected function makeFile() |
||
79 | |||
80 | /** |
||
81 | * Get file destination. |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | protected function getDestinationFile() |
||
89 | |||
90 | /** |
||
91 | * Get module migration path. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | protected function getPath() |
||
101 | |||
102 | /** |
||
103 | * Get the migration filename. |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | protected function getFilename() |
||
111 | |||
112 | /** |
||
113 | * Get the stub content. |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | protected function getStubContent() |
||
121 | |||
122 | /** |
||
123 | * Replace placeholder text with correct values. |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | protected function formatContent($content) |
||
135 | |||
136 | /** |
||
137 | * Get the console command arguments. |
||
138 | * |
||
139 | * @return array |
||
140 | */ |
||
141 | protected function getArguments() |
||
148 | } |
||
149 |