Laravel 5.1 refresh and seed a single table

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)