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

This package is auto-updated.

Last update: 2024-12-07 02:30:36 UTC


README

Provides the ability to import data (raw sql or CSV) from a file or from files found in the supplied folder.

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status StyleCI Test Coverage Issue Count Code Climate

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.