I'm looking to refresh and seed a single table in Laravel 5.1. Is this even possible?
I have tried the below, but it gives an error (incorrect syntax).
php artisan migrate:refresh --path=database/migrations/CreateTableTimesheet
If I use: php artisan migrate:refresh
it just says:
Nothing to migrate
You could use migrate:refresh
command that will roll back all of your migrations and then execute the migrate
command. This command effectively re-creates your entire database :
php artisan migrate:refresh
And you may use the --class
option to specify a specific seeder class to run individually :
php artisan db:seed --class=UserTableSeeder
The full code will be :
php artisan migrate:refresh
php artisan db:seed --class=UserTableSeeder
Hope this helps.