|
@@ 436-446 (lines=11) @@
|
| 433 |
|
return $response; |
| 434 |
|
} |
| 435 |
|
|
| 436 |
|
DB::transaction(function () { |
| 437 |
|
$inserts = $this->prepareInsert($this->updates); |
| 438 |
|
|
| 439 |
|
foreach ($inserts as $column => $value) { |
| 440 |
|
$this->model->setAttribute($column, $value); |
| 441 |
|
} |
| 442 |
|
|
| 443 |
|
$this->model->save(); |
| 444 |
|
|
| 445 |
|
$this->updateRelation($this->relations); |
| 446 |
|
}); |
| 447 |
|
|
| 448 |
|
if (($response = $this->callSaved()) instanceof Response) { |
| 449 |
|
return $response; |
|
@@ 605-616 (lines=12) @@
|
| 602 |
|
return $response; |
| 603 |
|
} |
| 604 |
|
|
| 605 |
|
DB::transaction(function () { |
| 606 |
|
$updates = $this->prepareUpdate($this->updates); |
| 607 |
|
|
| 608 |
|
foreach ($updates as $column => $value) { |
| 609 |
|
/* @var Model $this->model */ |
| 610 |
|
$this->model->setAttribute($column, $value); |
| 611 |
|
} |
| 612 |
|
|
| 613 |
|
$this->model->save(); |
| 614 |
|
|
| 615 |
|
$this->updateRelation($this->relations); |
| 616 |
|
}); |
| 617 |
|
|
| 618 |
|
if (($result = $this->callSaved()) instanceof Response) { |
| 619 |
|
return $result; |