PhpStorm 中的 Laravel 4 Blade 标记和 Ide Helper
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18638253/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel 4 Blade markup and Ide Helper in PhpStorm
提问by clod986
I cannot manage to have the autocomplete in PhpStorm to work for the Laravel 4 blade.php files. I've searched everywhere, but I cannot find other users with my problem. I have correctly installed this repository at https://github.com/barryvdh/laravel-ide-helperbut I still get a blank formatting for the blade pages.
我无法让 PhpStorm 中的自动完成功能适用于 Laravel 4 Blade.php 文件。我到处搜索,但找不到其他有问题的用户。我已经在https://github.com/barryvdh/laravel-ide-helper正确安装了这个存储库,但我仍然得到了刀片页面的空白格式。
Thanks
谢谢
采纳答案by Hailwood
The laravel-ide-helper package is not designed to give you autocomplete in the blade.php files. The laravel-ide-helper package is designed to give you autocomplete for the laravel facades in other PHP files.
laravel-ide-helper 包不是为了在blade.php 文件中提供自动完成功能。laravel-ide-helper 包旨在为您提供其他 PHP 文件中 laravel 外观的自动完成功能。
PHPstorm does not know that code between {{ }}
and {{{ }}}
is PHP code so it does not know that it should provide autocomplete ability.
PHPstorm不知道代码之间{{ }}
,并{{{ }}}
为PHP代码,因此它不知道它应该提供自动完成功能。
There is an issue on the PHPstorm Issue Tracker for syntax highlighting for the blade templating languagethat you should add your voice to if you wish for JetBrains to implement this feature.
PHPstorm 问题跟踪器存在一个问题,用于刀片模板语言的语法突出显示,如果您希望 JetBrains 实现此功能,您应该添加您的声音。
回答by Alex
As for PHPstorm 9 you just have to change the settings for blade files to recognize Laravel's tags as follows:
对于 PHPstorm 9,您只需更改刀片文件的设置即可识别 Laravel 的标签,如下所示: