protected function getModelAttributes(Model $model)
    {
        $attributes = [];

        foreach ($this->attributeKeys($model) as $modelKey => $field) {
            if (is_numeric($modelKey)) {
                $modelKey = $field;
                $field = $this->fieldForAttribute($field);
            }

            $attributes[$field] = $this->extractAttribute($model, $modelKey, $field);
        }

        return $attributes;
    }