Home

Awesome

SmartSeeder for Laravel

For Laravel 5, please use the 5.0 branch!

For Laravel 4, please use the 4.2 branch!

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?

Features

Use

When you install SmartSeeder, various artisan commands are made available to you which use the same methodology you're used to using with Migrations.

<table> <tr><td>seed:run</td><td>Runs all the seeds in the smartSeeds directory that haven't been run yet.</td></tr> <tr><td>seed:make</td><td>Makes a new seed class in the environment you specify.</td></tr> <tr><td>seed:rollback</td><td>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.</td></tr> <tr><td>seed:reset</td><td>Resets all the seeds.</td></tr> <tr><td>seed:refresh</td><td>Resets and re-runs all seeds.</td></tr> <tr><td>seed:install</td><td>You don't have to use this... it will be run automatically when you call "seed"</td></tr> </table>

Installation