Download the PHP package luizneves01/smart-seeder without Composer
On this page you can find all versions of the php package luizneves01/smart-seeder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luizneves01/smart-seeder
More information about luizneves01/smart-seeder
Files in luizneves01/smart-seeder
Package smart-seeder
Short Description Versioned, environment-based Seeders in Laravel.
License MIT
Informations about the package smart-seeder
LaravelSeeder
Seeding as it is currently done in Laravel is intended only for dev builds, but what if you're iteratively creating your database and want to constantly flush it and repopulate it during development?
What if you want to seed a production database with different data from what you use in development? What if you want to seed a table you've added to a database that is currently in production with new data?
LaravelSeeder takes the database migration features in Laravel and extends them to database seeders, making them "migratable". All of the functionality you have grown accustomed to with Laravel migrations have been mirrored and behave similarly for seeders.
Requirements
- Laravel >= 8.0
- PHP >= 7.4
Installation
- Run
- Run 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 stored
Features
- Allows you to seed databases in different environments with different values.
- Allows you to "version" seeds the same way that Laravel currently handles migrations. Running will only run seeds that haven't already been run.
- Allows you to run multiple seeds of the same model/table
- Prompts you if your database is in production
Usage
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" |
All versions of smart-seeder with dependencies
illuminate/support Version ^8.0|^9.0
illuminate/console Version ^8.0|^9.0
illuminate/database Version ^8.0|^9.0
illuminate/filesystem Version ^8.0|^9.0