| Package Data | |
|---|---|
| Maintainer Username: | gravitano | 
| Maintainer Contact: | pingpong.labs@gmail.com (Pingpong Labs) | 
| Package Create Date: | 2014-08-21 | 
| Package Last Update: | 2017-08-07 | 
| Home Page: | https://packagist.org/packages/pingpong/csv-reader | 
| Language: | PHP | 
| License: | BSD-3-Clause | 
| Last Refreshed: | 2025-11-02 15:15:08 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 21,580 | 
| Monthly Downloads: | 17 | 
| Daily Downloads: | 0 | 
| Total Stars: | 8 | 
| Total Watchers: | 1 | 
| Total Forks: | 5 | 
| Total Open Issues: | 1 | 
This package is require PHP 5.4 or higher.
Open your composer.json file, and add the new required package.
"pingpong/csv-reader": "1.0.*"
Next, open a terminal and run.
composer update
Next, Add new aliases in app/config/app.php.
'CsvReader' => 'Pingpong\CsvReader\Facades\CsvReader',
Done.
Create new instance.
$path = app_path('file.csv');
$csv = CsvReader::get($path); 
// OR
$csv = CsvReader::make($path);
Get data.
$data = $csv->getData();
Get data as array.
$data = $csv->toArray();
Get data as json.
$data = $csv->toJson();
Get data as object.
$data = $csv->toObject();
Looping.
foreach($csv as $item)
{
	var_dump($item);
}
Basically all functions and APIs same as above.
$path = __DIR__ . '/path/to/csvfile.csv';
$csv = new Pingpong\CsvReader\CsvReader($path);
$data = $csv->getData();
This package is open-sourced software licensed under The BSD 3-Clause License