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