How to Run Specific Migration in Laravel

Hello Artisan,

In this Laravel migration tutorial, I am going to show you migration tips and that is how to run specific migration in Laravel 8. I will simply create a new model and then I will only migrate that newly created migration file.

You know that sometimes we need to run only specific migration files to migrate our tables. So how we can run specific migration in Laravel? If you don't know how to run specific migration, then this tutorial is for you.

So let's create a new migration file:

php artisan make:model CarBodyType -m


Now assume we only want to migrate that file. So to do so, run the below command:

php artisan migrate --path=/database/migrations/2021_12_19_163339_create_car_body_types_table.php


Read also: How to Implement Rate Limiting in Laravel 8


Hope this tutorial will help you.


Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js