/yii2-csvdataprovider

Yii2 extension providing a data provider implementation for CSV files

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

CsvDataProvider

This Yii2 extension implements a data provider based on a csv

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist gri3li/yii2-csvdataprovider

or add

"gri3li/yii2-csvdataprovider": "*"

to the require section of your composer.json.

Usage

$provider = new CsvDataProvider([
    'filename' => '/path/to/file.csv',
    'pagination' => [
        'pageSize' => 20,
    ],
]);