美文网首页
为PhpStorm添加Laravel 代码智能提示功能

为PhpStorm添加Laravel 代码智能提示功能

作者: 梅先森森森森森森 | 来源:发表于2019-08-13 10:37 被阅读0次

1.安装laravel插件

image

2. 应用 composer 安装 barryvdh/laravel-ide-helper

2.1 右键打开composer 搜索laravel-ide-helper

image

2.2 安装aravel-ide-helper

找到barrvdh/laravel-ide-helper 进行安装,需要花一些时间进行文件下载。

image

2.3 配置模块

安装成功后,在 项目中的 conifg/app.php 的providers的数组中添加类的支持

<pre style="box-sizing: border-box; outline: 0px; margin: 0px 0px 24px; padding: 8px; position: relative; font-family: Consolas, Inconsolata, Courier, monospace; white-space: pre-wrap; overflow-wrap: break-word; overflow-x: auto; font-size: 14px; line-height: 22px; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,</pre>

image

2.4 通过命令行生成 _ide_helper.php文件

在命令行中,到项目的当前目录下执行如下命令:会产生一个新的文件

php artisan ide-helper:generate

image

2.5 提示功能验证

重启PhpStorm IDE后,验证是否有代码提示功能。

image

4. 参考文章

http://www.cnblogs.com/yeanzhi/p/4231181.html

http://blog.csdn.net/diannet/article/details/47724465

相关文章

网友评论

      本文标题:为PhpStorm添加Laravel 代码智能提示功能

      本文链接:https://www.haomeiwen.com/subject/tcowjctx.html