|
@@ 392-402 (lines=11) @@
|
| 389 |
|
return $response; |
| 390 |
|
} |
| 391 |
|
|
| 392 |
|
DB::transaction(function () { |
| 393 |
|
$inserts = $this->prepareInsert($this->updates); |
| 394 |
|
|
| 395 |
|
foreach ($inserts as $column => $value) { |
| 396 |
|
$this->model->setAttribute($column, $value); |
| 397 |
|
} |
| 398 |
|
|
| 399 |
|
$this->model->save(); |
| 400 |
|
|
| 401 |
|
$this->updateRelation($this->relations); |
| 402 |
|
}); |
| 403 |
|
|
| 404 |
|
if (($response = $this->callSaved()) instanceof Response) { |
| 405 |
|
return $response; |
|
@@ 601-612 (lines=12) @@
|
| 598 |
|
return $response; |
| 599 |
|
} |
| 600 |
|
|
| 601 |
|
DB::transaction(function () { |
| 602 |
|
$updates = $this->prepareUpdate($this->updates); |
| 603 |
|
|
| 604 |
|
foreach ($updates as $column => $value) { |
| 605 |
|
/* @var Model $this->model */ |
| 606 |
|
$this->model->setAttribute($column, $value); |
| 607 |
|
} |
| 608 |
|
|
| 609 |
|
$this->model->save(); |
| 610 |
|
|
| 611 |
|
$this->updateRelation($this->relations); |
| 612 |
|
}); |
| 613 |
|
|
| 614 |
|
if (($result = $this->callSaved()) instanceof Response) { |
| 615 |
|
return $result; |