public function getModelRelatedItems($model, Field $field)
    {
        $name = $field->getOption('field_name');

        if ($field->getOption('multiple_values')) {
            //if a sort_field is provided, use it, otherwise sort by the name field
            if ($sortField = $field->getOption('sort_field')) {
                return $model->{$name}()->orderBy($sortField)->get();
            } else {
                return $model->{$name}()->get();
            }
        } else {
            return $model->{$name}()->get();
        }
    }