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(5mo ago)31MITPHP

Since Dec 28Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/bowphp/csv)[ Packagist](https://packagist.org/packages/bowphp/csv)[ RSS](/packages/bowphp-csv/feed)WikiDiscussions main Synced 3w 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

31

—

LowBetter than 66% of packages

Maintenance70

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

178d 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.8k3.5M916](/packages/statamic-cms)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[civicrm/civicrm-core

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

749284.3k35](/packages/civicrm-civicrm-core)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293943.4k27](/packages/craftcms-feed-me)[soapbox/laravel-formatter

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

2481.1M13](/packages/soapbox-laravel-formatter)[october/rain

October Rain Library

1581.7M73](/packages/october-rain)

PHPackages © 2026

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