hnhdigital-os / laravel-database-seeder
Provides the ability to import a file or files from a folder into your database.
1.1.0
2019-09-06 14:50 UTC
Requires
- php: ^7.2
- league/csv: ^9.0
Requires (Dev)
- illuminate/database: 4.*|5.*|6.*
- phpmd/phpmd: ~2.0
- squizlabs/php_codesniffer: ~3.0
- symfony/process: ~2.3
This package is auto-updated.
Last update: 2024-11-07 02:24:58 UTC
README
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.
Prerequisites
- PHP >= 7.2
- Laravel >= 5.8
Install
Via composer:
composer require hnhdigital-os/laravel-database-seeder ~1.0
Usage
CSV
# php artisan db:seed-from-csv {path?} {--connection}
- {path} -A file or a directory of files to import.
- {--connection} - Set the connection that will be used when importing. Defaults to 'database.default'.
SQL
# php artisan db:seed-from-sql {path?} {--connection}
- {path} - A file or a directory of files to import.
- {--connection} - Set the connection that will be used when importing. Defaults to 'database.default'.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.