Hello. How in laravel can you add values to a database that come in an array on hasMany links? Analog attach on a belongsToMany connection.
$person = Person::create($request->all()); $person->fields->createmany($request->fields); // выходит ошибка $request->fields is a bulk. Everything looks like this
array( 'first_name' => 'Test' 'fields' => array( 0 => 'asdasd', 1 => 'asda312312sd', 2 => 'a123123sdasd', ) ) I know about saveMany but he also gives errors
belongsToManyconnection, but there is no link on thehasManyconnection. And the fact that there is iscreate / save / saveMany / createMany. But it did not come out with them. I solved the problem yesterday. - Alex_01