@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | return $ret; |
254 | 254 | } |
255 | 255 | |
256 | - collect(explode(',', $id))->filter()->each(function ($id) { |
|
256 | + collect(explode(',', $id))->filter()->each(function($id) { |
|
257 | 257 | $builder = $this->model()->newQuery(); |
258 | 258 | |
259 | 259 | if ($this->isSoftDeletes) { |
@@ -306,9 +306,9 @@ discard block |
||
306 | 306 | |
307 | 307 | $data = $model->toArray(); |
308 | 308 | |
309 | - $this->fields()->filter(function ($field) { |
|
309 | + $this->fields()->filter(function($field) { |
|
310 | 310 | return $field instanceof Field\File; |
311 | - })->each(function (Field\File $file) use ($data) { |
|
311 | + })->each(function(Field\File $file) use ($data) { |
|
312 | 312 | $file->setOriginal($data); |
313 | 313 | |
314 | 314 | $file->destroy(); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | return $response; |
334 | 334 | } |
335 | 335 | |
336 | - DB::transaction(function () { |
|
336 | + DB::transaction(function() { |
|
337 | 337 | $inserts = $this->prepareInsert($this->updates); |
338 | 338 | |
339 | 339 | foreach ($inserts as $column => $value) { |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | return $response; |
539 | 539 | } |
540 | 540 | |
541 | - DB::transaction(function () { |
|
541 | + DB::transaction(function() { |
|
542 | 542 | $updates = $this->prepareUpdate($this->updates); |
543 | 543 | |
544 | 544 | foreach ($updates as $column => $value) { |
@@ -602,13 +602,13 @@ discard block |
||
602 | 602 | { |
603 | 603 | if (request('after-save') == 1) { |
604 | 604 | // continue editing |
605 | - $url = rtrim($resourcesPath, '/') . "/{$key}/edit"; |
|
605 | + $url = rtrim($resourcesPath, '/')."/{$key}/edit"; |
|
606 | 606 | } elseif (request('after-save') == 2) { |
607 | 607 | // continue creating |
608 | - $url = rtrim($resourcesPath, '/') . '/create'; |
|
608 | + $url = rtrim($resourcesPath, '/').'/create'; |
|
609 | 609 | } elseif (request('after-save') == 3) { |
610 | 610 | // view resource |
611 | - $url = rtrim($resourcesPath, '/') . "/{$key}"; |
|
611 | + $url = rtrim($resourcesPath, '/')."/{$key}"; |
|
612 | 612 | } else { |
613 | 613 | $url = request(Builder::PREVIOUS_URL_KEY) ?: $resourcesPath; |
614 | 614 | } |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | protected function getFieldByColumn($column) |
1016 | 1016 | { |
1017 | 1017 | return $this->fields()->first( |
1018 | - function (Field $field) use ($column) { |
|
1018 | + function(Field $field) use ($column) { |
|
1019 | 1019 | if (is_array($field->column())) { |
1020 | 1020 | return in_array($column, $field->column()); |
1021 | 1021 | } |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | { |
1035 | 1035 | $values = $this->model->toArray(); |
1036 | 1036 | |
1037 | - $this->fields()->each(function (Field $field) use ($values) { |
|
1037 | + $this->fields()->each(function(Field $field) use ($values) { |
|
1038 | 1038 | $field->setOriginal($values); |
1039 | 1039 | }); |
1040 | 1040 | } |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | { |
1049 | 1049 | $relations = $this->getRelations(); |
1050 | 1050 | |
1051 | - $this->fields()->each(function (Field $field) use ($relations) { |
|
1051 | + $this->fields()->each(function(Field $field) use ($relations) { |
|
1052 | 1052 | if ($field->getSnakeAttributes()) { |
1053 | 1053 | return; |
1054 | 1054 | } |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | |
1091 | 1091 | $data = $this->model->toArray(); |
1092 | 1092 | |
1093 | - $this->fields()->each(function (Field $field) use ($data) { |
|
1093 | + $this->fields()->each(function(Field $field) use ($data) { |
|
1094 | 1094 | if (!in_array($field->column(), $this->ignored, true)) { |
1095 | 1095 | $field->fill($data); |
1096 | 1096 | } |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | */ |
1234 | 1234 | public function setWidth($fieldWidth = 8, $labelWidth = 2): self |
1235 | 1235 | { |
1236 | - $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
1236 | + $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) { |
|
1237 | 1237 | /* @var Field $field */ |
1238 | 1238 | $field->setWidth($fieldWidth, $labelWidth); |
1239 | 1239 | }); |