Package Data | |
---|---|
Maintainer Username: | satkaku |
Package Create Date: | 2015-02-10 |
Package Last Update: | 2015-04-22 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:01:05 |
Package Statistics | |
---|---|
Total Downloads: | 33,701 |
Monthly Downloads: | 209 |
Daily Downloads: | 9 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 3 |
Total Open Issues: | 1 |
Simple CSV manipulation for Laravel. Also you can select encoding.
Add to composer.json
'monokakure/laravel-csv': 'dev-master'
Install your composer
composer install
Add ServiceProvider to app.php
'Monokakure\CSV\CSVServiceProvider',
If you want, add Alias
'CSV'=> 'Monokakure\CSV\CSVFacade',
CSV::create($arr, $header);
CSV::create($arr, $header)->build();
CSV::setEncode('SJIS-win', 'UTF-8')->create($arr, $header)->build();
CSV::create($arr, $header)->setBOM_UTF8()->build();
CSV::create($arr, $header)->setBOM_UTF16LE()->build();
CSV::create($arr, $header)->setDelimiter("\t")->build();
CSV::create($arr, $header)->render();
CSV::parse('sample.csv');
If you want, you can use extended Monokakure\CSV\CSV class. Override Monokakure\CSV\Factory#getCSV method.