Skip to content

Commit 83d89a2

Browse files
committed
Pluck fields from value to create
1 parent c0bea1e commit 83d89a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Observers/HasManyObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public function updating(Model $model, $attribute, $value)
3434
*/
3535
public function created(Model $model, $attribute, $value)
3636
{
37-
$model->{$attribute}()->createMany($value);
37+
$model->{$attribute}()->createMany(Arr::pluck($value, 'fields'));
3838
}
3939
}

0 commit comments

Comments
 (0)