|  | @@ 335-345 (lines=11) @@ | 
                                                            
                                    | 332 |  |             return $response; | 
                                                            
                                    | 333 |  |         } | 
                                                            
                                    | 334 |  |  | 
                                                            
                                    | 335 |  |         DB::transaction(function () { | 
                                                            
                                    | 336 |  |             $inserts = $this->prepareInsert($this->updates); | 
                                                            
                                    | 337 |  |  | 
                                                            
                                    | 338 |  |             foreach ($inserts as $column => $value) { | 
                                                            
                                    | 339 |  |                 $this->model->setAttribute($column, $value); | 
                                                            
                                    | 340 |  |             } | 
                                                            
                                    | 341 |  |  | 
                                                            
                                    | 342 |  |             $this->model->save(); | 
                                                            
                                    | 343 |  |  | 
                                                            
                                    | 344 |  |             $this->updateRelation($this->relations); | 
                                                            
                                    | 345 |  |         }); | 
                                                            
                                    | 346 |  |  | 
                                                            
                                    | 347 |  |         if (($response = $this->complete($this->saved)) instanceof Response) { | 
                                                            
                                    | 348 |  |             return $response; | 
                                                                                
                                |  | @@ 530-541 (lines=12) @@ | 
                                                            
                                    | 527 |  |             return $response; | 
                                                            
                                    | 528 |  |         } | 
                                                            
                                    | 529 |  |  | 
                                                            
                                    | 530 |  |         DB::transaction(function () { | 
                                                            
                                    | 531 |  |             $updates = $this->prepareUpdate($this->updates); | 
                                                            
                                    | 532 |  |  | 
                                                            
                                    | 533 |  |             foreach ($updates as $column => $value) { | 
                                                            
                                    | 534 |  |                 /* @var Model $this->model */ | 
                                                            
                                    | 535 |  |                 $this->model->setAttribute($column, $value); | 
                                                            
                                    | 536 |  |             } | 
                                                            
                                    | 537 |  |  | 
                                                            
                                    | 538 |  |             $this->model->save(); | 
                                                            
                                    | 539 |  |  | 
                                                            
                                    | 540 |  |             $this->updateRelation($this->relations); | 
                                                            
                                    | 541 |  |         }); | 
                                                            
                                    | 542 |  |  | 
                                                            
                                    | 543 |  |         if (($result = $this->complete($this->saved)) instanceof Response) { | 
                                                            
                                    | 544 |  |             return $result; |