public function saveRelationships(\Illuminate\Http\Request $input, &$model, array $fields)
    {
        //run through the edit fields to see if we need to set relationships
        foreach ($fields as $name => $field) {
            if ($field->getOption('external')) {
                $field->fillModel($model, $input->get($name, null));
            }
        }
    }
public function saveRelationships(\Illuminate\Http\Request $input, &$model, array $fields)
    {
        //run through the edit fields to see if we need to set relationships
        foreach ($fields as $name => $field) {
            if ($field->getOption('external')) {
                $field->fillModel($model, $input->get($name, null));
            }
        }
    }
public function saveRelationships ( \ Illuminate \ Http \ Request $ input , & $ model , array $ fields ) { //run through the edit fields to see if we need to set relationships foreach ( $ fields as $ name => $ field ) { if ( $ field -> getOption ( 'external' ) ) { $ field -> fillModel ( $ model , $ input -> get ( $ name , null ) ) ; } } }
After a model has been saved, this is called to save the relationships.

@param \Illuminate\Http\Request            $input
@param \Illuminate\Database\Eloquent\Model $model
@param array                               $fields
After a model has been saved this is called to save the relationships .