@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | public function make() { |
43 | - $name = ($this->name)?:ucwords(str_replace("_"," ",$this->table)); |
|
43 | + $name = ($this->name) ?: ucwords(str_replace("_", " ", $this->table)); |
|
44 | 44 | |
45 | 45 | $template = file_get_contents(__DIR__."/../templates/FooBarController.stub"); |
46 | 46 | |
47 | 47 | //Replace table |
48 | - $template = str_replace("{table}",'"'.$this->table.'"', $template); |
|
48 | + $template = str_replace("{table}", '"'.$this->table.'"', $template); |
|
49 | 49 | |
50 | 50 | //Replace permalink |
51 | 51 | $template = str_replace("{permalink}", '"'.$this->table.'"', $template); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | //Replace scaffolding |
57 | 57 | $fields = DB::getSchemaBuilder()->getColumnListing($this->table); |
58 | 58 | $scaffold = ""; |
59 | - foreach($fields as $field) { |
|
59 | + foreach ($fields as $field) { |
|
60 | 60 | $scaffold .= '$this->addText("'.$field.'");'."\n\t\t"; |
61 | 61 | } |
62 | 62 | $template = str_replace("{scaffolding}", $scaffold, $template); |