|
@@ 445-455 (lines=11) @@
|
| 442 |
|
return $response; |
| 443 |
|
} |
| 444 |
|
|
| 445 |
|
DB::transaction(function () { |
| 446 |
|
$inserts = $this->prepareInsert($this->updates); |
| 447 |
|
|
| 448 |
|
foreach ($inserts as $column => $value) { |
| 449 |
|
$this->model->setAttribute($column, $value); |
| 450 |
|
} |
| 451 |
|
|
| 452 |
|
$this->model->save(); |
| 453 |
|
|
| 454 |
|
$this->updateRelation($this->relations); |
| 455 |
|
}); |
| 456 |
|
|
| 457 |
|
if (($response = $this->callSaved()) instanceof Response) { |
| 458 |
|
return $response; |
|
@@ 614-625 (lines=12) @@
|
| 611 |
|
return $response; |
| 612 |
|
} |
| 613 |
|
|
| 614 |
|
DB::transaction(function () { |
| 615 |
|
$updates = $this->prepareUpdate($this->updates); |
| 616 |
|
|
| 617 |
|
foreach ($updates as $column => $value) { |
| 618 |
|
/* @var Model $this->model */ |
| 619 |
|
$this->model->setAttribute($column, $value); |
| 620 |
|
} |
| 621 |
|
|
| 622 |
|
$this->model->save(); |
| 623 |
|
|
| 624 |
|
$this->updateRelation($this->relations); |
| 625 |
|
}); |
| 626 |
|
|
| 627 |
|
if (($result = $this->callSaved()) instanceof Response) { |
| 628 |
|
return $result; |