Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/backendtea/phinx-csv-seeder
- Owner: BackEndTea
- License: mit
- Created: 2017-12-15T18:22:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T11:31:33.000Z (about 1 year ago)
- Last Synced: 2024-08-18T07:49:51.484Z (5 months ago)
- Topics: csv, database, phinx, seeder
- Language: PHP
- Size: 15.6 KB
- Stars: 3
- Watchers: 4
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.