We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -124,8 +124,9 @@ discard block |
||
124 | 124 | $this->data['entry'] = $this->crud->entry = $item; |
125 | 125 | |
126 | 126 | // show a success message |
127 | - if($this->crud->model::find($item->id)) |
|
128 | - \Alert::success(trans('backpack::crud.insert_success'))->flash(); |
|
127 | + if($this->crud->model::find($item->id)) { |
|
128 | + \Alert::success(trans('backpack::crud.insert_success'))->flash(); |
|
129 | + } |
|
129 | 130 | |
130 | 131 | // save the redirect choice for next time |
131 | 132 | $this->setSaveAction(); |
@@ -156,8 +157,8 @@ discard block |
||
156 | 157 | |
157 | 158 | $this->data['id'] = $id; |
158 | 159 | |
159 | - if($this->crud->eagerLoad && !empty($this->crud->eagerLoad)) |
|
160 | - foreach($this->crud->eagerLoad as $relation_name) |
|
160 | + if($this->crud->eagerLoad && !empty($this->crud->eagerLoad)) { |
|
161 | + foreach($this->crud->eagerLoad as $relation_name) |
|
161 | 162 | { |
162 | 163 | if($this->data['entry'] && $rel = $this->data['entry']->{$relation_name}) |
163 | 164 | { |
@@ -166,6 +167,7 @@ discard block |
||
166 | 167 | if(starts_with($field_name, $relation_name)) |
167 | 168 | { |
168 | 169 | $column_name = str_replace("{$relation_name}.", '', $field_name); |
170 | + } |
|
169 | 171 | |
170 | 172 | $this->data['fields'][$field_name]['value'] = $rel->{$column_name}; |
171 | 173 | } |
@@ -284,10 +286,11 @@ discard block |
||
284 | 286 | }) |
285 | 287 | ->toArray(); |
286 | 288 | |
287 | - if(!$rel = $item->{$relation_name}) |
|
288 | - $item->{$relation_name}()->create($data); |
|
289 | - else |
|
290 | - $item->{$relation_name}->update($data); |
|
289 | + if(!$rel = $item->{$relation_name}) { |
|
290 | + $item->{$relation_name}()->create($data); |
|
291 | + } else { |
|
292 | + $item->{$relation_name}->update($data); |
|
293 | + } |
|
291 | 294 | }); |
292 | 295 | } |
293 | 296 | } |