| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Request extends BaseGenerator implements GeneratorInterface |
||
| 8 | {
|
||
| 9 | public function generate() |
||
| 10 | {
|
||
| 11 | $controllerTemplate = $this->buildTemplate('Backend/Request', [
|
||
| 12 | '{{modelName}}' => $this->module->getModelName(),
|
||
| 13 | '{{authorization}}' => "true",
|
||
| 14 | '{{rules}}' => $this->getRules()
|
||
| 15 | ]); |
||
| 16 | |||
| 17 | $fullFilePath = $this->getPath("app/Http/Requests/Backend/").$this->module->getModelName()."Request".".php";
|
||
| 18 | file_put_contents($fullFilePath, $controllerTemplate); |
||
| 19 | return $fullFilePath; |
||
| 20 | } |
||
| 21 | |||
| 22 | protected function getRules(){
|
||
| 25 | } |
||
| 26 | } |
||
| 27 |