PHPackages                             sukohi/fluent-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. [File &amp; Storage](/categories/file-storage)
4. /
5. sukohi/fluent-csv

ActiveLibrary[File &amp; Storage](/categories/file-storage)

sukohi/fluent-csv
=================

A Laravel package to generate or save csv file with encoding like SJIS-win.

3.0.5(5y ago)828.4k↓50%32MITPHP

Since Jun 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/SUKOHI/FluentCsv)[ Packagist](https://packagist.org/packages/sukohi/fluent-csv)[ RSS](/packages/sukohi-fluent-csv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (13)Used By (2)

FluentCsv
=========

[](#fluentcsv)

A Laravel package that allows you to generate or save csv file being encoded.
This package is maintained under Laravel 5.7.

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

[](#installation)

Execute composer command.

```
composer require sukohi/fluent-csv:3.*

```

Usage
=====

[](#usage)

Download
--------

[](#download)

```
$csv_data = [   // UTF-8
    ['データ 1-1', 'データ 1-2', 'データ 1-3'],
    ['データ 2-1', 'データ 2-2', 'データ 2-3'],
    ['データ 3-1', 'データ 3-2', 'データ 3-3'],
];
$to_encoding = 'SJIS-win';
$fluent = \FluentCsv::setData($csv_data, $to_encoding);
return $fluent->download('テスト.csv');    // File name can be multi-byte character.

```

Save
----

[](#save)

```
$csv_data = [   // UTF-8
    ['データ 1-1', 'データ 1-2', 'データ 1-3'],
    ['データ 2-1', 'データ 2-2', 'データ 2-3'],
    ['データ 3-1', 'データ 3-2', 'データ 3-3'],
];
$fluent = \FluentCsv::setData($csv_data, 'SJIS-win');

if($fluent->save(storage_path('app/public/test.csv'))) {

    echo 'Complete!';

}

```

Add data in loop
----------------

[](#add-data-in-loop)

```
$items = \App\Item::get();
$fluent = \FluentCsv::setEncoding('SJIS-win');

foreach($items as $item) {

    $fluent->addData($item->only(['id', 'name']));

}

return $fluent->download('test.csv');

```

Clear data
----------

[](#clear-data)

```
$fluent->clearData();

```

Retrieve
========

[](#retrieve)

```
// Basic way
$path = '/PATH/TO/YOUR/CSV/FOLDER/test.csv';
$data = \FluentCsv::parse($path);

// with encoding
$path = '/PATH/TO/YOUR/CSV/FOLDER/test.csv';
$from_encoding = 'sjis-win';
$data = \FluentCsv::parse($path, $from_encoding);

```

License
=======

[](#license)

This package is licensed under the MIT License.

Copyright 2017 Sukohi Kuhoh

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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

Every ~109 days

Recently: every ~78 days

Total

12

Last Release

2053d ago

Major Versions

1.0.x-dev → 2.0.02019-05-18

2.0.x-dev → 3.0.02019-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/2980d59b309d45df3f2e6e51b1d336614da063240b8f76f873f287cd745ec5db?d=identicon)[Sukohi](/maintainers/Sukohi)

---

Top Contributors

[![SUKOHI](https://avatars.githubusercontent.com/u/5362394?v=4)](https://github.com/SUKOHI "SUKOHI (11 commits)")[![bomshteyn](https://avatars.githubusercontent.com/u/4259699?v=4)](https://github.com/bomshteyn "bomshteyn (2 commits)")

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[azure-oss/storage-blob-laravel

Azure Storage Blob filesystem driver for Laravel

63582.2k1](/packages/azure-oss-storage-blob-laravel)[spatie/laravel-backup-server

Backup multiple applications

17016.7k1](/packages/spatie-laravel-backup-server)

PHPackages © 2026

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