[英]I can't generate migration file with make:migration command in Laravel
This happened to me a couple of months ago. 这发生在几个月前。 It might have happened in the process of a composer update, but I'm far from sure on that one.
这可能是在作曲家更新过程中发生的,但是我对此不确定。 I've even updated my project to Laravel 5.3 and it still I can not get make:migration to work through Artisan.
我什至将我的项目更新为Laravel 5.3,但仍然无法使make:migration通过Artisan工作。 No the project it updated to 5.4 and it still do not work.
没有将项目更新到5.4的项目,它仍然无法正常工作。
I've checked out this thread and I have the exact same problem. 我已经检查了这个线程 ,但我遇到了完全相同的问题。 The symptoms were exactly the same, however the OPs solutions did not work for me.
症状完全相同,但是OP解决方案对我不起作用。
I searched the web without any solution, then I gave up on that project and started to make my own migration files. 我没有任何解决方案地在网上搜索,然后放弃了该项目,开始制作自己的迁移文件。 However I now got some new hope when I saw that other thread.
但是,当我看到另一个线程时,现在有了新的希望。
After some troubleshooting I finaly managed to figure out the problem. 经过一些故障排除后,我最终设法找出了问题所在。 I narrowed it down to have something to do with the config/app.php-file .
我将其范围缩小到与config / app.php-file有关 。 Seems I in this project had typed in:
看来我在这个专案中输入了:
'timezone' => ' UTC+2 ' '时区'=>' UTC + 2 '
This made creation of migration-files come to a halt without error messages. 这使得迁移文件的创建停止而没有错误消息。 And it effected only the creation of migration-files (at least what I noticed).
而且它仅影响迁移文件的创建(至少是我注意到的)。
I changed it to ' UTC ' and it worked liked a charm again. 我将其更改为“ UTC ”,它再次变得很有魅力。
Note: the 'UTC+2' worked in the application and I never saw any other indications of errors regarding the rest of the app.php-file, or in the application in general. 注意: “ UTC + 2”在应用程序中起作用,我再也没有看到关于app.php文件其余部分或一般应用程序中任何其他错误的迹象。
Solution: When I instead used the parameters from this site it all worked perfectly again. 解决方案:当我改用此站点中的参数时,它们又再次正常运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.