laravel seed rollback after seeded to database

Aaron picture Aaron · Jun 23, 2017 · Viewed 17.9k times · Source

I have seeded my db using php artisan db::seed. Is there a way to rollback what I have seeded into my db. I cannot seem to find any command like php artisan db::seed rollback

Answer

Leo picture Leo · Jun 23, 2017

use Undo Seeder for Laravel.

When you install UndoSeeder, the following artisan commands are made available:

db:seed-undo    Undo seeds in the seeds directory.
db:seed-refresh Undo seeds run seeds again.

more Undo-Seeder