Where Is The Models Directory?
app directory by default
其中
app:,core code of your application, almost all of the classes in your application will be in this directory.
By default, this directory is namespaced under App and is autoloaded by Composer using the PSR-4 autoloading standard.
 Think of the Console and Http directories as providing an API into the core of your application. 
The Console directory contains all of your Artisan commands, while the Http directory contains your controllers, middleware, and requests.
A variety of other directories will be generated inside the app directory as you use the make Artisan commands to generate classes. for example, the app/Jobs directory will not exist until you execute the make:job Artisan command to generate a job class.
查看命令
 To review the available commands, run the php artisan list make command in your terminal.
The Console directory contains all of the custom Artisan commands for your application. These commands may be generated using the make:command . This directory also houses your console kernel, which is where your custom Artisan commands are registered and your scheduled tasks are defined.
Events Directory
This directory does not exist by default, but will be created for you by the event:generate andmake:event Artisan commands. The Events directory, as you might expect, houses event classes. Events may be used to alert other parts of your application that a given action has occurred, providing a great deal of flexibility and decoupling去耦合.
The Exceptions directory contains your application's exception handler and is also a good place to place any exceptions thrown by your application. If you would like to customize how your exceptions are logged or rendered, you should modify the Handler class in this directory.
The Http directory contains your controllers, middleware, and form requests. Almost all of the logic 所有逻辑 to handle requests entering your application will be placed in this directory.
Jobs Directory
This directory does not exist by default, but will be created for you if you execute the make:jobArtisan command. The Jobs directory houses the queueable jobs for your application. Jobs may be queued by your application or run synchronously 同步地 within the current request lifecycle. Jobs that run synchronously during the current request are sometimes referred to as "commands" since they are an implementation of the command pattern.
Listeners Directory
This directory does not exist by default, but will be created for you if you execute the event:generateor make:listener Artisan commands. The Listeners directory contains the classes that handle yourevents. Event listeners receive an event instance and perform logic in response to the event being fired. For example, a UserRegistered event might be handled by a SendWelcomeEmail listener.
Mail Directory
This directory does not exist by default, but will be created for you if you execute the make:mailArtisan command. The Mail directory contains all of your classes that represent emails sent by your application. Mail objects allow you to encapsulate all of the logic of building an email in a single, simple class that may be sent using the Mail::send method.
Notifications Directory
This directory does not exist by default, but will be created for you if you execute themake:notification Artisan command. The Notifications directory contains all of the "transactional事务性的" notifications that are sent by your application, such as simple notifications about events that happen within your application. Laravel's notification features abstracts sending notifications over a variety of drivers such as email, Slack, SMS, or stored in a database.
Policies Directory
This directory does not exist by default, but will be created for you if you execute the make:policyArtisan command. The Policies directory contains the authorization policy classes for your application. Policies are used to determine if a user can perform a given action against a resource. For more information, check out the authorization documentation.
 Providers Directory
The Providers directory contains all of the service providers for your application. Service providers bootstrap your application by binding services in the service container, registering events, or performing any other tasks to prepare your application for incoming requests.
In a fresh Laravel application, this directory will already contain several providers. You are free to add your own providers to this directory as needed.
===================================================================================
Bootstrap : files that bootstrap the framework and configure autoloading. 里面有个cache directory which contains framework generated files for performance optimization such as the route and services cache files.
Config :配置文件 目录
Database :database migration and seeds.
Public :contains the index.php file, which is the entry point for all requests entering your application. This directory also houses your assets such as images, JavaScript, and CSS.
Resources :
contains your views as well as your raw, un-compiled assets such as LESS, SASS, or JavaScript. This directory also houses all of your language files.
Routes :
contains all of the route definitions for your application. By default, three route files are included with Laravel: web.php, api.php, and console.php.
The web.php  contains routes that the RouteServiceProvider places in the web middleware group, which provides session state, CSRF protection, and cookie encryption. If your application does not offer a stateless, RESTful API, all of your routes will most likely be defined in the web.phpfile.
The api.php file contains routes that the RouteServiceProvider places in the api middleware group, which provides rate limiting. These routes are intended to be stateless, so requests entering the application through these routes are intended to be authenticated via tokens and will not have access to session state.
The console.php file is where you may define all of your Closure based console commands. Each Closure is bound to a command instance allowing a simple approach to interacting with each command's IO methods. Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application.
Storage 
contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework. This directory is segregated into app, framework, and logs directories. The app directory may be used to store any files generated by your application. Theframework directory is used to store framework generated files and caches. Finally, the logsdirectory contains your application's log files.
The storage/app/public directory may be used to store user-generated files, such as profile avatars, that should be publicly accessible. You should create a symbolic link at public/storage which points to this directory. You may create the link using the php artisan storage:link command.
Tests
test class should be suffixed with the word TestYou may run your tests using the phpunit orphp vendor/bin/phpunit commands.
Vendor 
contains your Composer dependencies.

Laravel系列 目录结构的更多相关文章

  1. Laravel项目目录结构说明

    Laravel项目目录结构说明: |- vendor 目录包含你的 Composer 依赖模块及laravel框架. |- bootstrap 目录包含几个框架启动跟自动加载配置的文件. |- app ...

  2. 微信小程序购物商城系统开发系列-目录结构

    上一篇我们简单介绍了一下微信小程序的IDE(微信小程序购物商城系统开发系列-工具篇),相信大家都已经蠢蠢欲试建立一个自己的小程序,去完成一个独立的商城网站. 先别着急我们一步步来,先尝试下写一个自己的 ...

  3. MongoDB基础教程系列--目录结构

    最近对 MongoDB 产生兴趣,在网上找的大部分都是 2.X 版本,由于 2.X 与 3.X 差别还是很大的,所以自己参考官网,写了本系列.MongoDB 的知识还是很多的,本系列会持续更新,本文作 ...

  4. 详解Laravel的目录结构

    Models 目录在哪里? 许多初学者可能都会困惑 Laravel 为什么没有提供 models 目录,官方解释说是因为不同人对 models 这个词的含义看法不同,容易造成歧义,有些开发者认为应用的 ...

  5. Laravel之目录结构

    一.根目录 新安装的 Laravel 应用包含许多文件夹:• app 目录包含了应用的核心代码:• bootstrap 目录包含了少许文件用于框架的启动和自动载入配置,还有一个cache 文件夹用于包 ...

  6. (2) laravel App目录结构说明

    应用的核心代码位于 app 目录下,默认情况下,该目录位于命名空间 App 下, 并且被 Composer 通过 PSR-4自动载入标准 自动加载. app 目录下包含多个子目录,如Console.H ...

  7. discuz x 系列目录结构说明

    api ┄┄┄外部接口  connect ┄┄┄腾讯互联  db ┄┄┄UCenter数据库备份接口  google ┄┄┄Google引擎使用  javascript ┄┄┄数据和广告的 J ...

  8. laravel框架目录结构详解

  9. laravel 目录结构

    图 1.1 显示了 Laravel 项目目录结构是什么样子: 图1.1 Laravel 项目目录结构 就如你看到这样,laravel下面只包含了4个文件夹,这4个文件夹下面有一些子文件夹,这种丰富的子 ...

随机推荐

  1. Effective C++ -----条款52:写了placement new 也要写 placement delete

    当你写一个placement operator new ,请确定也写出了对应的placement operator delete.如果没有这样做,你的程序可能会发生隐微而时断时续的内存泄漏. 当你声明 ...

  2. Javascript调用C#后台方法及JSon解析

    Javascript调用C#后台方法及JSon解析   如何使用Ajax 调用C# 后台方法. 本文目录 如何使用Ajax 调用C# 后台方法. 1.后台(.cs)测试方法 2.前台调用(javasc ...

  3. LeetCode 459 Repeated Substring Pattern

    Problem: Given a non-empty string check if it can be constructed by taking a substring of it and app ...

  4. C# webBrowser控件使用

    C# webBrowser控件使用心得 最近用到WebBrowser控件,遇到很多问题,也学习了不少新的东西.下面是我在C#下写的关于WebBrowser控件使用的代码. 1.WebBrowser常用 ...

  5. cell分割线宽度不满屏处理

    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { [cell setSeparatorInset:UIEdgeInsetsZ ...

  6. [Android Pro] Android以root起一个process[shell脚本的方法]

    reference to :  http://***/Article/11768 有时候我们写的app要用uid=0的方式启动一个process,framework层和app层是做不到的,只有通过写脚 ...

  7. vs2013中项目依赖项的作用

    依赖项就是设定项目所以来的项目,以决定具体生成解决方案时,项目编译的顺序(一般一个解决方案会有很多项目组成). 通常来说,依赖项取决于这个项目引用的组件和项目,系统可以自己决定. 作用就是让系统知道你 ...

  8. 柔性数组 data[0]

    struct MyData {    int nLen;    char data[0];}; 在结构中,data是一个数组名:但该数组没有元素:该数组的真实地址紧随结构体MyData之后,而这个地址 ...

  9. sql server 常用脚本(日常查询所需)

    1:查看sql server代理中作业的运行状况的脚本 -- descr : a simple sql script to view sql server jobs run status -- las ...

  10. (2)Underscore.js常用方法

    目录 1.集合相关方法        1.1.数组的处理                map(循环,有返回值),将返回的值依次存入一个新的数组                each(循环,无返回值 ...