public function fields(array $fields = [])
    {
        if (!Arr::isAssoc($fields)) {
            $fields = array_combine($fields, $fields);
        }

        foreach ($fields as $field => $label) {
            $this->field($field, $label);
        }

        return $this;
    }
public function fields(array $fields = [])
    {
        if (!Arr::isAssoc($fields)) {
            $fields = array_combine($fields, $fields);
        }

        foreach ($fields as $field => $label) {
            $this->field($field, $label);
        }

        return $this;
    }
public function fields ( array $ fields = [ ] ) { if ( ! Arr :: isAssoc ( $ fields ) ) { $ fields = array_combine ( $ fields , $ fields ) ; } foreach ( $ fields as $ field => $ label ) { $ this -> field ( $ field , $ label ) ; } return $ this ; }
Add multiple fields.

@param array $fields

@return $this
Add multiple fields .