Laravel Rolling Back Migrations


What if you want to rollback the latest migration i.e recent operation, you can use the awesome rollback command. But remember that this command rolls back only the last migration, which may include multiple migration files

php artisan migrate:rollback

If you are interested in rolling back all of your application migrations, you may use the following command

php artisan migrate:reset 

Moreover if you are lazy like me and want to rollback and migrate with one command, you may use this command

php artisan migrate:refresh
php artisan migrate:refresh --seed

You can also specify number of steps to rollback with step option. Like this will rollback 1 step.

php artisan migrate:rollback --step=1