| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | protected function createController($module, $filename) |
||
| 14 | { |
||
| 15 | $this->info('Creating a new Controller'); |
||
|
|
|||
| 16 | $this->info('Creating ' . $module . ':' . $filename . ' Controller'); |
||
| 17 | $this->createControllersFolder($module); |
||
| 18 | if (!file_exists(base_path() . "/app/Modules/" . $module . "/Controllers/" . $filename . ".php")) { |
||
| 19 | file_put_contents( |
||
| 20 | base_path() . "/app/Modules/" . $module . "/Controllers/" . $filename . ".php", |
||
| 21 | $this->compileControllerStub($module, $filename) |
||
| 22 | ); |
||
| 23 | (file_exists(base_path() . "/app/Modules/" . $module . "/Controllers/" . $filename . ".php") ? $this->info('Done'):$this->error('An error occurred')); |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | $this->error('Controller already exists'); |
||
| 27 | return; |
||
| 28 | } |
||
| 58 | } |