classes/Input/NestedModels.php
protected function updateChild($relation, $id, $input, $prefix)
    {
        $child = $relation->getRelated()->findOrFail($id);
        $child->fill($input);
        $rules = $this->getRules($relation, $input);
        (new ModelValidator)->validateAndPrefixErrors($prefix, $child, $rules);
        $child->save();
    }
protected function updateChild($relation, $id, $input, $prefix)
    {
        $child = $relation->getRelated()->findOrFail($id);
        $child->fill($input);
        $rules = $this->getRules($relation, $input);
        (new ModelValidator)->validateAndPrefixErrors($prefix, $child, $rules);
        $child->save();
    }
protected function updateChild ( $ relation , $ id , $ input , $ prefix ) { $ child = $ relation -> getRelated ( ) -> findOrFail ( $ id ) ; $ child -> fill ( $ input ) ; $ rules = $ this -> getRules ( $ relation , $ input ) ; ( new ModelValidator ) -> validateAndPrefixErrors ( $ prefix , $ child , $ rules ) ; $ child -> save ( ) ; }
Update an existing child record

@param  Relation $relation
@param  integer  $id
@param  array    $input    The data for the nested model
@param  string   $prefix   The input name prefix, for validation
@return void
Update an existing child record