给Phpstorm添加Laravel代码提示 1

PhpStorm Laravel 代码提示(代码模板)

1. 给Phpstorm添加Laravel代码提示 1

2. 给Phpstorm添加Laravel代码提示 2

PhpStorm Laravel Live Templates

作者:https://github.com/koomai/phpstorm-laravel-live-templates

因原作者没有更新了,笔者在其基础上更新。https://github.com/xiaobing1024/phpstorm-laravel-live-templates

使用方法:

1. 下载 xml 文件放到 templates 文件夹下

* Windows: C:\Users\Administrator\.PhpStorm2017.3\config\templates

* Linux: ~\.PhpStorm2017.3\config\templates

* OS X: ~/Library/Preferences/PhpStorm2017.3/templates

2. 重启 PhpStorm

3. 打开设置,搜索 Live Templates 就能看到添加的模板

导入之前必看 : 

这个代码提示有一个缺点

Blade 代码提示会影响 PhpStorm 自带的 Blade 提示。

一旦导入,会让自带的提示失效。仅限*.blade.php,其他php文件提示没有问题

原本只需要『输入一个字母』就会出现提示,会变成要输入『完整单词』才会出现提示。

解决方案:

不输入完整单词也可以提示,先输入 `@` 或 `单词` 然后按 `Cmd + JCtrl+J就可以手动调出『提示』,再输入想要的单词,和我们平常敲代码习惯有点不一样,感觉会很奇怪。

所以导入之前,要确定『这个步骤』不会干扰影响自己。导入后『系统提示』就恢复不了了,谨慎导入。取决于自己,Happy Code 才是最重要的。


给Phpstorm添加Laravel代码提示 1_第1张图片
atr
给Phpstorm添加Laravel代码提示 1_第2张图片
has


给Phpstorm添加Laravel代码提示 1_第3张图片
if
section

你可能感兴趣的:(给Phpstorm添加Laravel代码提示 1)