PHPackages                             gefar/laravel-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. gefar/laravel-formatter

AbandonedLibrary[PDF &amp; Document Generation](/categories/documents)

gefar/laravel-formatter
=======================

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others. And supports @attributes in XML and delimiter for csv

2.5(6y ago)062MITPHPPHP &gt;=5.4.0

Since Mar 26Pushed 6y agoCompare

[ Source](https://github.com/gefar/laravel-formatter)[ Packagist](https://packagist.org/packages/gefar/laravel-formatter)[ RSS](/packages/gefar-laravel-formatter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (8)Used By (0)

Attention!
----------

[](#attention)

This fork was made to support encoding and '@attributes' in xml, so that nodes (xml tags) could support attributes. *Any credits should go to the original author of this bundle.***Use at your own risk!**

Formatter Bundle
================

[](#formatter-bundle)

[![Build Status](https://camo.githubusercontent.com/0cadc69168427771770566400eb3d7f6e72f5bd5839b86a0199d7d65fae584b7/68747470733a2f2f7472617669732d63692e6f72672f536f6170426f782f6c61726176656c2d666f726d61747465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/SoapBox/laravel-formatter)

A formatter package that will help you to easily convert between various formats such as XML, JSON, CSV, etc...

Goals
=====

[](#goals)

The goals of this library are to allow the transfomation of data formats from one type to another. See Parsers and Formats to see supported input / output formats.

Installation
============

[](#installation)

Through command line:

```
composer require daniel-furmanov/laravel-formatter
```

Through composer.json:

```
{
  "require": {
	"daniel-furmanov/laravel-formatter": "dev-master",
  }
}
```

Parsers
-------

[](#parsers)

All of the following are supported formats that the formatter can read from.

- Array
- CSV
- JSON
- XML
- YAML

Formats
-------

[](#formats)

All of the following are formats that are supported for output.

- Array
- CSV
- JSON
- XML
- YAML

General Usage
-------------

[](#general-usage)

**Including The Formatter**

```
use DanielFurmanov\Formatter\Formatter;
```

**Supported Types**

```
Formatter::JSON; //json
Formatter::CSV;  //csv
Formatter::XML;  //xml
Formatter::ARR;  //array
Formatter::YAML; //yaml
```

**Making Your First Formatter(s)**

```
$formatter = Formatter::make($jsonString, Formatter::JSON);
$formatter = Formatter::make($yamlString, Formatter::YAML);
$formatter = Formatter::make($array, Formatter::ARR);
...
```

**Outputting From Your Formatter**

```
$csv   = $formatter->toCsv();
$json  = $formatter->toJson();
$xml   = $formatter->toXml();
$array = $formatter->toArray();
$yaml  = $formatter->toYaml();
```

Deprecated Functionality
------------------------

[](#deprecated-functionality)

The following have been deprecated from the library, however you can easily continue using them in your application

**Serialized Array**

```
$serialized = serialize($formatter->toArray());
```

**PHP Export**

```
$export = var_export($formatter->toArray());
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~418 days

Recently: every ~486 days

Total

6

Last Release

2336d ago

Major Versions

1.4 → 2.02014-10-20

PHP version history (2 changes)1.1PHP &gt;=5.3.0

2.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f621fa28a4e8faf0c0b9d965bbf035f935242efbc38f16d3f87695b49ce9df7b?d=identicon)[Gefar](/maintainers/Gefar)

---

Top Contributors

[![Jaspaul](https://avatars.githubusercontent.com/u/2836589?v=4)](https://github.com/Jaspaul "Jaspaul (36 commits)")[![grahammccarthy](https://avatars.githubusercontent.com/u/1336930?v=4)](https://github.com/grahammccarthy "grahammccarthy (19 commits)")[![gefar01](https://avatars.githubusercontent.com/u/217210038?v=4)](https://github.com/gefar01 "gefar01 (17 commits)")[![dberry37388](https://avatars.githubusercontent.com/u/1000887?v=4)](https://github.com/dberry37388 "dberry37388 (9 commits)")[![DanielFurmanov](https://avatars.githubusercontent.com/u/8160816?v=4)](https://github.com/DanielFurmanov "DanielFurmanov (8 commits)")[![AustinW](https://avatars.githubusercontent.com/u/333398?v=4)](https://github.com/AustinW "AustinW (1 commits)")[![worzy](https://avatars.githubusercontent.com/u/1092417?v=4)](https://github.com/worzy "worzy (1 commits)")[![cecilozaur](https://avatars.githubusercontent.com/u/853395?v=4)](https://github.com/cecilozaur "cecilozaur (1 commits)")[![dpwilhelmsen](https://avatars.githubusercontent.com/u/1758049?v=4)](https://github.com/dpwilhelmsen "dpwilhelmsen (1 commits)")[![garethtdavies](https://avatars.githubusercontent.com/u/135382?v=4)](https://github.com/garethtdavies "garethtdavies (1 commits)")[![nikolay-zakharov](https://avatars.githubusercontent.com/u/1189334?v=4)](https://github.com/nikolay-zakharov "nikolay-zakharov (1 commits)")

---

Tags

formatterlaravelxmlconvertdatayamlcsv

### Embed Badge

![Health badge](/badges/gefar-laravel-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/gefar-laravel-formatter/health.svg)](https://phpackages.com/packages/gefar-laravel-formatter)
```

###  Alternatives

[soapbox/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

2501.1M12](/packages/soapbox-laravel-formatter)[hitsend/laravel-formatter

A formatting library that converts data output between XML, CSV, JSON, TXT, YAML and a few others.

2502.0k](/packages/hitsend-laravel-formatter)[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M711](/packages/maatwebsite-excel)[dracoblue/craur

A lossless xml to json and json to xml converter (and csv/xlsx/yaml). Writing PHP Json/Xml/Csv/Yaml/excel Importers made easy

4643.1k2](/packages/dracoblue-craur)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
