PHP artisan migrate command

2024-03-04 05:16:31 Suraj Laravel

How to Run migrations in Laravel

Running migration in Laravel is easy task. Below are few artisan commands for to run database migration in Laravel Framework.

1. php artisan migrate: This command will run your all migrations.

2. php artisan migrate --force: Allow you to forcefully run all migrations. When we use --force flag with php artisan migrate command it will not ask for confirmation.

3. php artisan migrate --path=/database/migrations/my_migration_file.php: You can use this command to migrate single migration in laravel --path opetin take the path of migration file

This post is submitted by one of our members. You may submit a new post here.

Related Tricks