1 | <?php |
||
13 | class SeedMakeCommand extends GeneratorCommand |
||
14 | { |
||
15 | use ModuleCommandTrait, CanClearModulesCache; |
||
16 | |||
17 | protected $argumentName = 'name'; |
||
18 | |||
19 | /** |
||
20 | * The console command name. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $name = 'module:make-seed'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Generate new seeder for the specified module.'; |
||
32 | |||
33 | /** |
||
34 | * Get the console command arguments. |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | 91 | protected function getArguments() |
|
45 | |||
46 | /** |
||
47 | * Get the console command options. |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | 91 | protected function getOptions() |
|
52 | { |
||
53 | return [ |
||
54 | [ |
||
55 | 91 | 'master', |
|
56 | null, |
||
57 | InputOption::VALUE_NONE, |
||
58 | 'Indicates the seeder will created is a master database seeder.', |
||
59 | ], |
||
60 | ]; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return mixed |
||
65 | */ |
||
66 | 83 | protected function getTemplateContents() |
|
77 | |||
78 | /** |
||
79 | * @return mixed |
||
80 | */ |
||
81 | 83 | protected function getDestinationFilePath() |
|
91 | |||
92 | /** |
||
93 | * Get seeder name. |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | 83 | private function getSeederName() |
|
103 | |||
104 | /** |
||
105 | * Get default namespace. |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | 83 | public function getDefaultNamespace() : string |
|
113 | } |
||
114 |