如何在laravel模块下创建新的迁移文件?

如何在laravel模块下创建新的迁移文件?,laravel,Laravel,阅读laravel模块如何为laravel 6工作 我没有找到如何创建新的迁移文件。我尝试了两种方法,但都失败了: root@95e2f26acdf8:/app/Modules/Opportunities# php artisan make:migration leads_table_add_test_id_fields --table=leads Could not open input file: artisan root@95e2f26acdf8:/app/Modules/Opportu

阅读laravel模块如何为laravel 6工作

我没有找到如何创建新的迁移文件。我尝试了两种方法,但都失败了:

root@95e2f26acdf8:/app/Modules/Opportunities# php artisan make:migration leads_table_add_test_id_fields --table=leads
Could not open input file: artisan
root@95e2f26acdf8:/app/Modules/Opportunities# php artisan make:migration Opportunities leads_table_add_test_id_fields --table=leads
Could not open input file: artisan


root@95e2f26acdf8:/app/Modules/Opportunities# cd ../
root@95e2f26acdf8:/app/Modules# cd ../
root@95e2f26acdf8:/app# php artisan make:migration Opportunities leads_table_add_test_id_fields --table=leads
  Too many arguments, expected arguments "command" "name".
已修改

是的,那个命令

php artisan module:make-migration leads_table_add_test_fields Opportunities
工作正常。但我尝试将--table=选项添加为

php artisan module:make-migration leads_table_add_test_fields  Opportunities --table=opportunities 
但有一个错误:

 The "--table" option does not exist.
?


哪种方式正确?

我认为你应该跑:

php artisan module:make-migration add_field_to_leads_table Opportunities

php artisan module:make migration module_name,请阅读所有文档请检查此答案以在特定文件夹中创建新迁移。请查看MODIFIEDnwidart,我阅读时不支持额外的迁移命令