Laravel和phpStorm集成-“无法解析目录" [英] Laravel and phpStorm integration - "cannot resolve directory"

查看:382
本文介绍了Laravel和phpStorm集成-“无法解析目录"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel 5.1,并且观看了 Jeffrey's有关如何解决外墙问题的视频.现在,一切几乎都可以完美运行.

I'm using Laravel 5.1 and I watched Jeffrey's video about how to fix the facades issues. Now, Everything almost works perfect.

例如,当我尝试在视图上使用代码时:

when I try code on my views for example:

<script type="text/javascript" src="assets/js/page.js"></script>

phpStorm将这个位置标记为错误,因为他正在寻找不存在的文件Root/app/resources/views/layouts/assets/js/page.js,因此他无法解析文件的位置.

phpStorm marks this location as an error because he cannot resolve the location of the file because he's looking for the file Root/app/resources/views/layouts/assets/js/page.js which doesn't exists.

我该如何解决?

推荐答案

步骤1:单击File Menu

第2步:单击Settings,下面的图像应会出现一些. (您的可能与我的不同)

Step 2: Click on Settings, the following image should appear somewhat. (Yours may be different than mine)

步骤3:在搜索栏中,键入Directories,查看图片:

Step 3: In the search bar, type Directories, see the image:

第4步:看到projectroot时,单击它,然后单击Resource Root以将其标记为项目的根.

Step 4: When you see the root of your project, click on the it and click on the Resource Root to mark it as the root of your project.

第5步:点击Apply

第6步:点击OK

您的查询将被解决.希望这对您有所帮助.

And your query will be resolved. Hope this helps you out.

这篇关于Laravel和phpStorm集成-“无法解析目录"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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