@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | if (Schema::hasTable(config('twill.related_table', 'twill_related'))) { |
47 | 47 | $relatedItems = Collection::make(); |
48 | 48 | |
49 | - Collection::make($fields['browsers'])->each(function ($items, $browserName) use (&$relatedItems) { |
|
50 | - Collection::make($items)->each(function ($item) use ($browserName, &$relatedItems) { |
|
49 | + Collection::make($fields['browsers'])->each(function($items, $browserName) use (&$relatedItems) { |
|
50 | + Collection::make($items)->each(function($item) use ($browserName, &$relatedItems) { |
|
51 | 51 | try { |
52 | 52 | $repository = $this->getModelRepository($item['endpointType'] ?? $browserName); |
53 | 53 | $relatedItems->push((object) [ |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | if (Schema::hasTable(config('twill.related_table', 'twill_related'))) { |
77 | 77 | if (isset($fields['browsers'])) { |
78 | - Collection::make($fields['browsers'])->each(function ($items, $browserName) use ($object) { |
|
78 | + Collection::make($fields['browsers'])->each(function($items, $browserName) use ($object) { |
|
79 | 79 | $object->saveRelated($items, $browserName); |
80 | 80 | }); |
81 | 81 | } |
@@ -107,14 +107,14 @@ discard block |
||
107 | 107 | $blocksList = app(BlockCollection::class)->getBlockList(); |
108 | 108 | } |
109 | 109 | |
110 | - $block['type'] = $blocksList->keyBy('name')->search(function ($blockConfig) use ($block) { |
|
110 | + $block['type'] = $blocksList->keyBy('name')->search(function($blockConfig) use ($block) { |
|
111 | 111 | return $blockConfig['component'] === $block['type']; |
112 | 112 | }); |
113 | 113 | |
114 | 114 | $block['content'] = empty($block['content']) ? new \stdClass : (object) $block['content']; |
115 | 115 | |
116 | 116 | if ($block['browsers']) { |
117 | - $browsers = Collection::make($block['browsers'])->map(function ($items) { |
|
117 | + $browsers = Collection::make($block['browsers'])->map(function($items) { |
|
118 | 118 | return Collection::make($items)->pluck('id'); |
119 | 119 | })->toArray(); |
120 | 120 |