简体   繁体   English

PHPStorm中的Laravel 5.0代码完成

[英]Laravel 5.0 Code Completion in PHPStorm

I tried most of thing and did exactly like larval-ide-helper but getting issue while code completion. 我尝试了大多数事情,并且做得完全像larval-ide-helper一样,但是在代码完成时遇到了问题。 please have a look screenshot. 请看截图。

在此处输入图片说明

When i use \\Redirect in Code it working but not fully and if i use direct Redirect then here is screen : 当我在代码中使用\\ Redirect时,它可以正常工作,但不能完全正常工作;如果我使用直接重定向,则屏幕为:

在此处输入图片说明

Any one know what i missing ? 有人知道我想念什么吗?

Thanks 谢谢

I think you should look at gist https://gist.github.com/barryvdh/5227822 我认为您应该看看要点https://gist.github.com/barryvdh/5227822

Just download under your project root and restart you IDE. 只需在项目根目录下下载并重新启动IDE。

From https://github.com/barryvdh/laravel-ide-helper 来自https://github.com/barryvdh/laravel-ide-helper

Update 更新资料

And also take a look on video by Jef: 并观看杰夫的视频:

https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/15 https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/15

Update About Namespace in Laravel 5: Laravel 5中有关命名空间的更新:

The Redirect facade is not in the current namespace. 重定向外观不在当前名称空间中。 So you either prepend it with : 因此,您可以在前面加上:

return \\Redirect::something();

Or add this at the top of your controller file: 或将其添加到控制器文件的顶部:

use Redirect;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM