protected function saveOptions(CustomField $field, Field $customfield)
    {
        if (is_null($field->options)) {
            return false;
        }
        $options = ($field->options instanceof Closure) ? call_user_func($field->options) : $field->options;
        foreach ($options as $value => $label) {
            FieldTypeOption::query()->firstOrCreate([
                'field_id' => $customfield->id,
                'label'    => $label,
                'value'    => $value
            ]);
        }
        return true;
    }