@@ -750,8 +750,11 @@ discard block |
||
750 | 750 | $child = $relation->findOrNew($key); |
751 | 751 | |
752 | 752 | if (Arr::get($related, static::REMOVE_FLAG_NAME) == 1) { |
753 | - if ($attachable) $this->model->$name()->detach($child); |
|
754 | - else $child->delete(); |
|
753 | + if ($attachable) { |
|
754 | + $this->model->$name()->detach($child); |
|
755 | + } else { |
|
756 | + $child->delete(); |
|
757 | + } |
|
755 | 758 | continue; |
756 | 759 | } |
757 | 760 | |
@@ -761,7 +764,9 @@ discard block |
||
761 | 764 | |
762 | 765 | $child->save(); |
763 | 766 | |
764 | - if ($attachable && $child->wasRecentlyCreated) $this->model->$name()->attach($child); |
|
767 | + if ($attachable && $child->wasRecentlyCreated) { |
|
768 | + $this->model->$name()->attach($child); |
|
769 | + } |
|
765 | 770 | } |
766 | 771 | } |
767 | 772 |