webikevn/laravel-seeder is a Laravel package for versioned, environment-based seeders in laravel.
It currently has 1 GitHub stars and 20 downloads on Packagist (latest version 1.0).
Install it with composer require webikevn/laravel-seeder.
Discover more Laravel packages by webikevn
or browse all Laravel packages to compare alternatives.
Last updated
A Package was developed by River Crane Vietnam (MarketPlace)
composer require webikevn/laravel-seederWebikevn\LaravelSeeder\SeederServiceProvider::class to your providers array in app/config/app.phpphp artisan vendor:publish to push config files to your config folder if you want to override the name of the seeds folder, or the name of the table where seeds are storedphp artisan seed will only run seeds that haven't already been run.When you install LaravelSeeder, various artisan commands are made available to you which use the same methodology you're used to using with Migrations.
| seed | Runs all the seeds in the "seeders" directory that haven't been run yet. |
| seed:rollback | Rollback doesn't undo seeding (which would be impossible with an auto-incrementing primary key). It just allows you to re-run the last batch of seeds. |
| seed:reset | Resets all the seeds. |
| seed:refresh | Resets and re-runs all seeds. |
| seed:status | Gets the status of each migratable seeder. |
| seed:make | Makes a new seed class in the environment you specify. |
| seed:install | You don't have to use this... it will be run automatically when you call "seed" |
A Dockerfile with PHP 7.2, XDebug and Composer installed is bundled with the project to facilitate local development.
To easily bring up the local development environment, use the Docker Compose configuration:
docker-compose up -d --build
By default, the entrypoint script will install the Composer dependencies for you.
To run the test suite, execute the following:
docker-compose exec laravel-seeder test.sh
To run the code coverage suite, execute the following:
docker-compose exec laravel-seeder code-coverage.sh
Happy testing!