public function addFields(array $fields)
    {
        collect($fields)->each(function ($field, $key) {
            if (! $field instanceof AttachmentField) {
                $field = [$key => $field];
            }

            $this->addField($field);
        });

        return $this;
    }
public function addFields(array $fields)
    {
        collect($fields)->each(function ($field, $key) {
            if (! $field instanceof AttachmentField) {
                $field = [$key => $field];
            }

            $this->addField($field);
        });

        return $this;
    }
public function addFields ( array $ fields ) { collect ( $ fields ) -> each ( function ( $ field , $ key ) { if ( ! $ field instanceof AttachmentField ) { $ field = [ $ key => $ field ] ; } $ this -> addField ( $ field ) ; } ) ; return $ this ; }
Add the fields for the attachment.

@param array $fields

@return $this
Add the fields for the attachment .