讨论数量:
@阳光温暖 我也是这样
https://github.com/laravel/framework/issue... 这上面的能解决
- 把 "require-dev" 中的 "fzaninotto/faker" 复制到 "require" 里面
- git push heroku master
- heroku run bash
- composer install
- php artisan db:seed
如果以后还要执行生成伪数据的操作, 重复 3-4-5 即可
@Armin 这个 require-dev 要怎么配置呢, 谢谢
答:
在 composer.json 文件中, 复制 require-dev 中的 "fzaninotto/faker": "~1.4", 然后放到 require 中
@阳光温暖 我也是这样
https://github.com/laravel/framework/issue... 这上面的能解决
- 把 "require-dev" 中的 "fzaninotto/faker" 复制到 "require" 里面
- git push heroku master
- heroku run bash
- composer install
- php artisan db:seed
如果以后还要执行生成伪数据的操作, 重复 3-4-5 即可
@beatles 如果运行 composer install
出现 warning 提示
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
那么再执行 composer update 就行
第三遍了, 依然出问题, 可能是网络原因吧, 这回用 composer update 都装不上, 用 composer update fzaninotto/fake 可以了, 估计是网络原因, 多试几遍
解决了,是因为线上没有引用 “ fzaninotto/faker ”组件 ,要在require-dev里配置一下