gpt4 book ai didi

php - Laravel 5.4 迁移 :generate fails with Way\Generators\Filesystem\FileNotFound error

转载 作者:行者123 更新时间:2023-12-03 23:08:24 25 4
gpt4 key购买 nike

我正在尝试使用Xethron/migrations-generator在 Laravel 5.4 项目中,以便为我的数据库中的所有表生成迁移文件。我按照 README 中的说明进行操作严格归档 Laravel 5。解决一两个投诉后(必须安装 php7.0-xml 扩展),我尝试运行它,但它会抛出如下错误:

$ php artisan migrate:generate
Using connection: mysql

Generating migrations for: group_product_assoc, groups, product_hierarchy_assoc, product_product_assoc, products, replist, sessionsOLD, stores, tree, users, zipcode_coordinates

Do you want to log these migrations in the migrations table? [Y/n] :
> n

Setting up Tables and Index Migrations


[Way\Generators\Filesystem\FileNotFound]
/var/www/my-project/vendor/way/generators/src/Way/Generators/templates/migration.txt

我已举报此issue到 github 上的 Xethron ,显然我不是唯一遇到这个问题的人。

谁能告诉我如何让它工作?我对 Laravel 或 Composer 不是特别熟悉,所以请不要忽略基本解释。我正在使用:

  • Ubuntu 16.04
  • PHP 7.0.15
  • Laravel 5.4

最佳答案

我也遇到了同样的问题。您需要将以下文件复制到该位置:

https://github.com/Xethron/Laravel-4-Generators/tree/master/src/Way/Generators/templates/migration.txt

进入此文件夹(有可能,该文件夹不存在 - 因此您可以创建文件夹或更改供应商 Xethron 中的配置文件 (config.php)

/var/www/my-project/vendor/way/generators/src/Way/Generators/templates/

关于php - Laravel 5.4 迁移 :generate fails with Way\Generators\Filesystem\FileNotFound error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42451134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com