PHPackages                             bowphp/csv - 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. bowphp/csv

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

bowphp/csv
==========

CSV formatter for Bowphp

1.0.0(7mo ago)31MITPHP

Since Dec 28Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/bowphp/csv)[ Packagist](https://packagist.org/packages/bowphp/csv)[ RSS](/packages/bowphp-csv/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Bowphp CSV
==========

[](#bowphp-csv)

A tiny helper to export and import Eloquent-like models to/from CSV using [league/csv](https://csv.thephpleague.com/).

Installation
------------

[](#installation)

```
composer require bowphp/csv
```

Quick start
-----------

[](#quick-start)

1. Add the `Bow\Csv\Csv` trait to your model:

```
use Bow\Csv\Csv;
use Bow\Database\Barry\Model;

class User extends Model
{
    use Csv;
}
```

2. Export a CSV string (optionally restrict columns):

```
$user = new User();
$user->setCsvHeaders(['id', 'name']);

$csv = $user->toCsv(); // returns the CSV as a string
```

3. Import rows from a CSV file into your model:

```
$user = new User();
$user->importCsv('/path/to/file.csv', ['id', 'name', 'email']);
```

Helper functions are also available:

```
app_export_model_to_csv(new User(), null, ['id', 'name']);
app_import_csv_to_model(new User(), '/path/to/file.csv', ['id', 'name', 'email']);
```

Contributing
------------

[](#contributing)

- Fork and create a topic branch.
- Install deps: `composer install`.
- Run tests: `./vendor/bin/phpunit tests --bootstrap=vendor/autoload.php`.
- Submit a PR with a clear description of the change.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance63

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96099e66c63e31445f3f76a12e94104030f504eeb18f007216bb4ebdcdeadf7f?d=identicon)[papac](/maintainers/papac)

---

Top Contributors

[![papac](https://avatars.githubusercontent.com/u/9353811?v=4)](https://github.com/papac "papac (17 commits)")

---

Tags

bowphpcsvphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bowphp-csv/health.svg)

```
[![Health](https://phpackages.com/badges/bowphp-csv/health.svg)](https://phpackages.com/packages/bowphp-csv)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.1k](/packages/statamic-cms)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M532](/packages/pimcore-pimcore)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.2k4.0k](/packages/leantime-leantime)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k49](/packages/civicrm-civicrm-core)[october/rain

October Rain Library

1601.7M99](/packages/october-rain)

PHPackages © 2026

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