Laravel Seed From File
Provides the ability to import data (raw sql or CSV) from a file or from files found in the supplied folder., (*1)
, (*2)
, (*3)
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital., (*4)
Install
Via composer:, (*5)
$ composer require-dev hnhdigital-os/laravel-seed-from-file ~1.0
, (*6)
This package autoloads from Laravel 5.5., (*7)
For Laravel 5.4 and below, enable the service provider by editing config/app.php:, (*8)
'providers' => [
...
HnhDigital\LaravelSeedFomFile\ServiceProvider::class,
...
];
Usage
Raw SQL
# php artisan db:seed-from-raw {dir} {--connection}
, (*9)
- {dir} - A file or a directory.
- {--connection} - Set the connection that will be used when importing. Defaults to
Config::get('default')
.
CSV
# php artisan db:seed-from-csv {dir} {--connection}
, (*10)
- {dir} - A file or a directory.
- {--connection} - Set the connection that will be used when importing. Defaults to
Config::get('default')
.
Contributing
Please see CONTRIBUTING for details., (*11)
Credits
License
The MIT License (MIT). Please see License File for more information., (*12)