protected function saveModelData(Model $model, \Ideil\GenericFile\Interpolator\InterpolatorResult $input)
    {
        // prepare data to fill model

        $model_map = $model->getFileAssignMap();
        $model_fields = [];

        foreach ($input->getData() as $field => $value) {
            $model_fields[isset($model_map[$field]) ? $model_map[$field] : $field] = $value;
        }

        // not save, just fill data

        $model->fill($model_fields);

        return $model;
    }
protected function saveModelData(Model $model, \Ideil\GenericFile\Interpolator\InterpolatorResult $input)
    {
        // prepare data to fill model

        $model_map = $model->getFileAssignMap();
        $model_fields = [];

        foreach ($input->getData() as $field => $value) {
            $model_fields[isset($model_map[$field]) ? $model_map[$field] : $field] = $value;
        }

        // not save, just fill data

        $model->fill($model_fields);

        return $model;
    }
protected function saveModelData ( Model $ model , \ Ideil \ GenericFile \ Interpolator \ InterpolatorResult $ input ) { // prepare data to fill model $ model_map = $ model -> getFileAssignMap ( ) ; $ model_fields = [ ] ; foreach ( $ input -> getData ( ) as $ field => $ value ) { $ model_fields [ isset ( $ model_map [ $ field ] ) ? $ model_map [ $ field ] : $ field ] = $ value ; } // not save, just fill data $ model -> fill ( $ model_fields ) ; return $ model ; }
Save file attributes required for interpolation to model.

@param string|Illuminate\Database\Eloquent\Model            $model
@param Ideil\LaravelFileOre\Interpolator\InterpolatorResult $input

@return Illuminate\Database\Eloquent\Model
Save file attributes required for interpolation to model .