Closed mahentoo closed 4 years ago
Thank you @mahentoo for this PR. We are looking over this internally and will let you know if we have any questions are comments!
@mahentoo We'd like a couple formatting/reorganization changes. Could you please update the code to look like this:
$parentModel = $model->{$attribute}()->first();
if (empty($parentModel)) {
return $this->creating($model, $attribute, $value);
}
if (count($value)) {
$parentModel->update($value[0]);
}
Once that is done, we will merge it in!
@brandonferens Done in #29
Thanks @mahentoo!
In cases where it is necessary to create (parent) during editing (model).