热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何在IntelliJIDEA中配置Laravel项目结构?

我应该将哪些文件夹标记为“源资源排除”?解决方法:我自己的逻辑基于thePHPStormguide资料来源Therootfolder推理:您的源代码可以位于根目录下的mutlipl

我应该将哪些文件夹标记为“源/资源/排除”?

enter image description here

解决方法:

我自己的逻辑基于the PHPStorm guide

资料来源

The root folder

推理:您的源代码可以位于根目录下的mutliple文件夹中.

替代方法:只需标记您在应用程序,引导程序,配置,路由中包含代码的真实文件夹,即可(更多…)


Click this button to mark the selected folder as the root for
namespaces used in your project. Based on this setting, PhpStorm

suggests you the proper folder name when you want to create a new

namespace under another parent namespace during creation or moving a

PHP class, that is, when you are actually creating or moving a PHP

class to a non-existing namespace under another parent namespace. If

no Sources folder is specified, you will have to type the proper

folder manually.

Appointing a Sources folder is not mandatory but this helps you keep

your project structure in compliance with the PSR0 and PSR4 standards.

See Configuring PHP Namespaces in a Project for details.


测验

tests

推理:出于显而易见的原因,您的测试默认情况下位于此处.您可能会为驻留在另一个文件夹中的Javascript代码使用一些测试库.


Click this button to mark the selected folder as a test root.


排除在外

vendor, storage

推理:我们在项目中使用的所有(composer)库都位于供应商手中,但不是我们自己的代码.默认情况下,我们不应该搜索它.
在存储实时缓存文件中,这些文件对我们而言没有重要意义,因此我们不会在版本控制中跟踪它们(例如供应商).我们可以删除它们,该应用程序仍然可以运行.


Click this button to mark the selected folder as excluded so PhpStorm

ignores it during indexing, parsing, and code completion.


资源根

public

推理:您自己的前端资产应位于公共文件夹下的某个位置(以供浏览器使用).前端资产是(主要是?)文件,Javascript和CSS.


Click this button to enable PhpStorm to complete relative paths to

resources under the selected folder.




推荐阅读
author-avatar
手机用户2502872795
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有