We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20c6413 commit 7f1ab0aCopy full SHA for 7f1ab0a
src/Console/GenerateApiResourceCommand.php
@@ -163,9 +163,11 @@ protected function generateResource(Model $model): void
163
protected function buildResource(string $class, string $name): string
164
{
165
$properties = $this->properties;
166
- $fields = array_map(function ($field) {
167
- return "'$field' => \$this->$field,";
168
- }, $properties);
+ $fields = '';
+
+ foreach ($properties as $property) {
169
+ $fields .= "\t\t\t'$property' => \$this->$property,\n";
170
+ }
171
172
$stub = $this->files->get($this->stub);
173
0 commit comments