Laravel create migration file in specific folder

Use this command on the root folder:

create the only Migration file:

php artisan make:migration create_products_table --create=products

Create Migration, Model file:

php artisan make:model Product -m

For Create Migration,Model,Controller file:

php artisan make:model Product -mcr

If you want to do it manually then you may set --path as per your folder requirement.

php artisan make:migration filename --path=/app/database/migrations/relations
php artisan make:migration filename --path=/app/database/migrations/translations

If you want to migrate then:

php artisan migrate --path="/app/database/migrations/relations"

For specific directories:

php artisan make:migration create_users_table --path=/packages/Payment/src/Database

The new migration will be placed in your packages/Payment/src/Database directory.

For Running Migrations: php artisan migrate --path=/packages/Payment/src/Database


Generating a migration using the inbuilt framework feature:

php artisan make:migration create_users_table

The new migration will be placed in your database/migrations directory.

For Running Migrations: php artisan migrate