@@ -11,13 +11,13 @@ |
||
11 | 11 | $viewsToBeGenerated = ['index']; |
12 | 12 | |
13 | 13 | foreach ($viewsToBeGenerated as $view) { |
14 | - $viewTemplate = $this->buildTemplate('Views/' . $view, [ |
|
14 | + $viewTemplate = $this->buildTemplate('Views/'.$view, [ |
|
15 | 15 | '{{modelName}}' => $this->module->getModelName(), |
16 | 16 | '{{moduleName}}' => $this->module->getModuleName(), |
17 | 17 | '{{modelNameSingularLowerCase}}' => strtolower($this->module->getModelName()) |
18 | 18 | ]); |
19 | 19 | |
20 | - file_put_contents(base_path("resources/views/" . $this->module->getModuleName() . "/{$view}.blade.php"), $viewTemplate); |
|
20 | + file_put_contents(base_path("resources/views/".$this->module->getModuleName()."/{$view}.blade.php"), $viewTemplate); |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 | } |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | |
25 | 25 | public function getStub($type) |
26 | 26 | { |
27 | - return file_get_contents(__DIR__ . "/../resources/stubs/" . $type . ".stub"); |
|
27 | + return file_get_contents(__DIR__."/../resources/stubs/".$type.".stub"); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function getPath($path) |
31 | 31 | { |
32 | 32 | $dir = base_path($path); |
33 | 33 | |
34 | - if(!is_dir($dir)) |
|
34 | + if (!is_dir($dir)) |
|
35 | 35 | mkdir($dir, 0755, true); |
36 | 36 | |
37 | 37 | return $dir; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function getTabs($number) |
46 | 46 | { |
47 | 47 | $schema = ""; |
48 | - for ($i=0; $i < $number; $i++) { |
|
48 | + for ($i = 0; $i < $number; $i++) { |
|
49 | 49 | $schema .= " "; |
50 | 50 | } |
51 | 51 | return $schema; |
@@ -31,8 +31,9 @@ |
||
31 | 31 | { |
32 | 32 | $dir = base_path($path); |
33 | 33 | |
34 | - if(!is_dir($dir)) |
|
35 | - mkdir($dir, 0755, true); |
|
34 | + if(!is_dir($dir)) { |
|
35 | + mkdir($dir, 0755, true); |
|
36 | + } |
|
36 | 37 | |
37 | 38 | return $dir; |
38 | 39 | } |
@@ -13,6 +13,6 @@ |
||
13 | 13 | '{{modelNameSingularLowerCase}}' => strtolower($this->module->getModelName()) |
14 | 14 | ]); |
15 | 15 | |
16 | - file_put_contents($this->getPath("app/Http/Controllers/") . $this->module->getModelName() . "Controller" . ".php", $controllerTemplate); |
|
16 | + file_put_contents($this->getPath("app/Http/Controllers/").$this->module->getModelName()."Controller".".php", $controllerTemplate); |
|
17 | 17 | } |
18 | 18 | } |