We can do fresh database migration. We can refresh database migration. We can seed database migration. Now in this tutorial we will see how we can refresh or fresh database migration along with seed.

Laravel provides a artisan command to migrate fresh command with seeder. If you do not know how to run that command then see the example command of php artisan migrate refresh seed:

php artisan migrate:refresh
 
# Refresh the database and run all database seeds...
php artisan migrate:refresh --seed

 

The migrate:fresh command will drop all the tables from the database and then execute the migrate command:

php artisan migrate:fresh
 
php artisan migrate:fresh --seed

 

Read also: How To Rollback Database Migration In Laravel?

 

Conclusion

I have tried to discuss the clear concept of php artisan migrate refresh seed. Now we know how to solve php artisan migrate fresh seed not working. Hope this laravel php artisan migrate refresh seed tutorial will help you.