| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function generate() |
||
| 10 | { |
||
| 11 | $controllerTemplate = $this->buildTemplate('Backend/Controller', [ |
||
| 12 | '{{modelName}}' => $this->module->getModelName(), |
||
| 13 | '{{moduleName}}' => $this->module->getModuleName(), |
||
| 14 | '{{modelNameLowercase}}' => strtolower($this->module->getModelName()) |
||
| 15 | ]); |
||
| 16 | |||
| 17 | $fullFilePath = $this->getPath("app/Http/Controllers/Backend/").$this->module->getModelName()."Controller".".php"; |
||
| 18 | file_put_contents($fullFilePath, $controllerTemplate); |
||
| 19 | return $fullFilePath; |
||
| 20 | } |
||
| 22 |