Laravel:无法使用make:migration命令生成迁移文件 [英] Laravel: Cannot generate migration file with make:migration command

查看:82
本文介绍了Laravel:无法使用make:migration命令生成迁移文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在进行的项目,迁移工作正常.但是我不知道是否有所更改,现在php artisan make:migration my_migration_name不会生成迁移文件,也不会显示任何错误.

I've got an ongoing project and migrations were working fine. But I don't know if something has changed, now php artisan make:migration my_migration_name is not generating a migration file and not showing any errors as well.

我尝试使用-v verbosity标志运行它,但是终端上没有打印任何内容.我的目录权限似乎很好;

I've tried running it with -v verbosity flag but nothing is printed on terminal. My directory permissions seem to be fine;

我也尝试过使用sudo运行它,但是我收到了此错误消息;

I've also tried running it with sudo but I got this error message;

我已经更新了作曲家,并尝试删除laravel并重新安装laravel/framework '5.1'.但是似乎没有任何帮助.:(

I've updated composer and tried to remove laravel and reinstall laravel/framework '5.1'. But nothing seem to help.:(

如果有人遇到此类问题并设法解决,那么我们将不胜感激.有什么建议可以解决这个问题吗?

If someone has faced this kind of issue and managed to resolve it, help would be really appreciated. Any suggestion how to resolve this issue?

推荐答案

我已经以某种方式使它工作了.这确实是很奇怪的行为,并尝试了不同的解决方案以使其正常运行.我认为我应该列出要遵循的步骤以使它起作用,对于可能会遇到这种行为的人.

I've got it working somehow. It was really weird behavior and tried different solutions to get it working. I thought I should list down steps I follow to get it working, for someone who may get into this type of behavior.

快速简便的解决方案可能是清除所有缓存的数据和应用程序配置.

Short and quick solution might be to clear all your cached data and application configs.

php artisan cache:clear # clear all cached files.
php artisan config:clear # clear application config cache
composer dump-autoload # reload all autoload classes

退出终端"并重新打开,希望它现在可以正常工作.

And quit the "TERMINAL" and reopen it, hope it should be working now.

如果仍然无法使用,请尝试以下选项并重复上述部分;

If it still don't work then try following options and repeat above mentioned part;

  • 使用composer重新安装laravel/framework.我在寻找解决方案时找到了它
  • 检查您的目录权限,查看您是否具有写权限.

希望!它可能会帮助某人.

Hope! It may help someone.

这篇关于Laravel:无法使用make:migration命令生成迁移文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆