Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/backendtea/phinx-csv-seeder

A csv seeder for phinx
https://github.com/backendtea/phinx-csv-seeder

csv database phinx seeder

Last synced: 2 months ago
JSON representation

A csv seeder for phinx

Awesome Lists containing this project

README

        

# Phinx Csv Seeder

[![Build Status](https://travis-ci.org/BackEndTea/Phinx-CSV-Seeder.svg?branch=master)](https://travis-ci.org/BackEndTea/Phinx-CSV-Seeder)

## Instalation

```bash
$ composer require backendtea/phinx-csv-seeder
```

## Requirements

* PHP 5.6 or higher
* robmorgan/phinx version 0.8.1 or higher

## Usage

Basic usage:
```php
insertCsv('users', __DIR__ . '/users.csv');
}
}
```
Will try and insert all csv records into the given table. The keys in the csv file are required
to match the keys in the database. Any values for a row not specified become their defaults.