hnhdigital-os/laravel-seed-from-file

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides the ability to import a file or files from a folder into your database.

1.0.0 2017-09-14 23:03 UTC

This package is auto-updated.

Last update: 2020-01-21 15:18:34 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.

Install

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,
        ...
    ];

Usage

Raw SQL

# 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').

CSV

# 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').

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.