@@ 136-144 (lines=9) @@ | ||
133 | $fieldModel = new FieldModel(); |
|
134 | $fieldTranslations = new EloquentCollection(); |
|
135 | ||
136 | if (isset($assignment['field']['translations'])) { |
|
137 | foreach (array_pull($assignment['field'], 'translations') as $attributes) { |
|
138 | ||
139 | $translation = new FieldModelTranslation(); |
|
140 | $translation->setRawAttributes($attributes); |
|
141 | ||
142 | $fieldTranslations->push($translation); |
|
143 | } |
|
144 | } |
|
145 | ||
146 | $assignment['field']['config'] = serialize($assignment['field']['config']); |
|
147 | ||
@@ 157-165 (lines=9) @@ | ||
154 | $assignmentModel = new AssignmentModel(); |
|
155 | $assignmentTranslations = new EloquentCollection(); |
|
156 | ||
157 | if (isset($assignment['translations'])) { |
|
158 | foreach (array_pull($assignment, 'translations') as $attributes) { |
|
159 | ||
160 | $translation = new AssignmentModelTranslation(); |
|
161 | $translation->setRawAttributes($attributes); |
|
162 | ||
163 | $assignmentTranslations->push($translation); |
|
164 | } |
|
165 | } |
|
166 | ||
167 | $assignmentModel->setRawAttributes($assignment); |
|
168 | $assignmentModel->setRawAttributes($assignment); |