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
.
Advertisement
Answer
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