@@ 134-147 (lines=14) @@ | ||
131 | * @param array $fields |
|
132 | * @return string |
|
133 | */ |
|
134 | private function getFillables(array $fields): string |
|
135 | { |
|
136 | $fillables = ''; |
|
137 | ||
138 | foreach ($fields as $index => $field) { |
|
139 | if ($index === 0) { |
|
140 | $fillables .= "'{$field}',"; |
|
141 | } else { |
|
142 | $fillables .= PHP_EOL . str_repeat(' ', 8) . "'{$field}',"; |
|
143 | } |
|
144 | } |
|
145 | ||
146 | return $fillables; |
|
147 | } |
|
148 | } |
|
149 |
@@ 30-43 (lines=14) @@ | ||
27 | * @param array $fields |
|
28 | * @return string |
|
29 | */ |
|
30 | private function getFillables(array $fields): string |
|
31 | { |
|
32 | $fillables = ''; |
|
33 | ||
34 | foreach ($fields as $index => $field) { |
|
35 | if ($index === 0) { |
|
36 | $fillables .= "'{$field['name']}',"; |
|
37 | } else { |
|
38 | $fillables .= PHP_EOL . str_repeat(' ', 8) . "'{$field['name']}',"; |
|
39 | } |
|
40 | } |
|
41 | ||
42 | return $fillables; |
|
43 | } |
|
44 | } |
|
45 |