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: 3 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T11:31:33.000Z (over 1 year ago)
- Last Synced: 2025-03-25T01:51:37.796Z (3 months ago)
- Topics: csv, database, phinx, seeder
- Language: PHP
- Size: 15.6 KB
- Stars: 3
- Watchers: 3
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phinx Csv Seeder
[](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.