Mercurial > packages > magicforger
comparison src/Generator/Generator.php @ 22:ee8ef14e158d main-dev
Now able to include through composer
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Wed, 26 Feb 2025 20:12:17 -0500 |
| parents | 19b7a8de0019 |
| children | 827efbf4d73c |
comparison
equal
deleted
inserted
replaced
| 21:f0b0d014e448 | 22:ee8ef14e158d |
|---|---|
| 81 /** | 81 /** |
| 82 * Get the console command options. | 82 * Get the console command options. |
| 83 * | 83 * |
| 84 * @return array | 84 * @return array |
| 85 */ | 85 */ |
| 86 protected function getOptions() | 86 protected function getOptions(): array |
| 87 { | 87 { |
| 88 return array_merge(parent::getOptions(), [ | 88 return array_merge(parent::getOptions(), [ |
| 89 ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, policy, resource controller, and form request classes for the table.'], | 89 ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, policy, resource controller, and form request classes for the table.'], |
| 90 ['controller', 'c', InputOption::VALUE_NONE, 'Generate a controller class for the table.'], | 90 ['controller', 'c', InputOption::VALUE_NONE, 'Generate a controller class for the table.'], |
| 91 ['model', 'm', InputOption::VALUE_NONE, 'Generate a model class for the table.'], | 91 ['model', 'm', InputOption::VALUE_NONE, 'Generate a model class for the table.'], |
| 97 /** | 97 /** |
| 98 * Interact further with the user if they were prompted for missing arguments. | 98 * Interact further with the user if they were prompted for missing arguments. |
| 99 * | 99 * |
| 100 * @return void | 100 * @return void |
| 101 */ | 101 */ |
| 102 protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output) | 102 protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output):void |
| 103 { | 103 { |
| 104 } | 104 } |
| 105 | 105 |
| 106 protected function getStub() | 106 protected function getStub():void |
| 107 { | 107 { |
| 108 } | 108 } |
| 109 | 109 |
| 110 protected function createController() | 110 protected function createController(): void |
| 111 { | 111 { |
| 112 $this->call('mf:controller', ['table' => $this->getTableInput(), '--fresh' => $this->option('fresh')]); | 112 $this->call('mf:controller', ['table' => $this->getTableInput(), '--fresh' => $this->option('fresh')]); |
| 113 } | 113 } |
| 114 | 114 |
| 115 protected function createModel() | 115 protected function createModel() |
