Skip to content
A lightning fast CSV import and export package for Laravel
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Finished building Reader class Jan 24, 2020
tests
.editorconfig
.gitattributes Another awesome package 📦 Jan 14, 2020
.gitignore
.scrutinizer.yml
.styleci.yml Another awesome package 📦 Jan 14, 2020
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json
phpunit.xml.dist

README.md

Lightning fast CSV exports and imports, powered by box/spout

Latest Version on Packagist Build Status Quality Score Total Downloads

Generating CSV files or importing data from them should not be difficult. Luckily, there are loads of packages out there that do this very thing, but some of there are verbose, some of them just don't work.

FastCSV tries to improve this experience with a fluent API, heavily inspired by Spatie's Simple Excel, but targeted just as CSV files. FastCSV also works with PHP >=7.2, whereas Spatie's Simple Excel only works with PHP >=7.4.

Installation

You can install the package via composer:

composer require ryangjchandler/fastcsv

Usage

### Writing

<?php

use Ryangjchandler\FastCSV\FastCSV;

FastCSV::write('./path/to/file.csv')
    ->addRow(['test' => 'cool', 'amazing' => 'row'])
    ->addRow(['test' => 'another', 'amazing' => 'row']);

This will create a file at the specified path, with the following value:

test,amazing
cool,row
another,row

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ryan@chandler.codes instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.

You can’t perform that action at this time.