Project Root
Let’s start by taking a look at the root folder structure.
• app/
• bootstrap/
• vendor/
• public/
• .gitattributes
• .gitignore
• artisan
• composer.json
• composer.lock
• phpunit.xml
• server.php

bootstrap
• autoload.php
• paths.php
• start.php
The bootstrap directory contains a few files that relate to the startup procedures of the framework.
The autoload.php file contains most of these procedures, and should only be edited by experienced
Laravel users.
The paths.php file builds an array of the common filesystem paths that are used by the framework.
If for some reason you decide to alter the directory structure of the framework packages, you may
need to alter the contents of this file to reflect your changes.
The start.php file contains more startup procedures for the framework. I don’t want to dig into
these in detail right now as that may cause unnecessary confusion. Instead you should probably
take note that framework environments can be set here. If you don’t know what the environments
are used for then don’t worry. We will cover that later!
Simply put, the contents of the bootstrap directory should only be edited by experienced Laravel
users who need to alter the shape of the framework on the filesystem. If you are new to Laravel,
then just ignore it for now, but don’t delete it! Laravel needs this directory to function.

vendor
The vendor directory contains all of the composer packages that are used by your application. This,
of course, includes the Laravel framework package. For more information about this directory please
refer back to the Composer primer chapter.

public
• packages/
• .htaccess
• favicon.ico
• index.php
• robots.txt
The public directory should be the only web facing directory of a Laravel application. It’s normally
where your assets such as CSS, Javascript files and images will live. Let’s have a closer look at the
contents.

The packages directory will be used to contain any assets that need to be installed by third party
packages. They are kept in a separate directory so that they don’t conflict with our applications own
assets.

The Application Directory
Here is where your application will take its shape. It is the directory in which you will spend most
of your time. For that reason, why don’t we get better acquainted with it?
• commands/
• config/
• controllers/
• database/
• lang/
• models/
• start/
• storage/
• tests/
• views/
• filters.php
• routes.php

commands
The commands directory contains any custom artisan command line interface commands that are
required by your application. You see the Artisan CLI not only provides default functionality to help
you build your project, but you may also create custom commands to do your bidding.
config
The configuration for both the framework and your application are kept within this directory.
Laravel’s configuration exists as a set of PHP files containing key-value arrays. This directory
will also contain sub directories which allow for different configurations to be loaded in different
environments.
controllers
As the name suggests, this directory will hold your controllers. Controllers can be used to provide
application logic, and to glue the separate parts of your application together. This directory has been
added to the default composer.json as a classmap autoload location for your convenience

database
Should you choose to use a database as a method of long term storage, then this directory will be
used to hold the files that will create your database schema, and methods for seeding it with sample
data. The default SQLite database is also located in this directory.
lang
The lang directory contains PHP files with arrays of strings that can be used to provide localisation
support to your application. Sub folders named by region allow for string files to exist for multiple
languages.
models
The models directory will contain your models. Surprised? Models are used to represent your
business model, or provide interaction with storage. Confused? Don’t worry. We will cover models
in detail in a later chapter. Know that a User model has been provided for you to enable application
authentication ‘out of the box’. Like the controllers directory, this has been added to the classmap
autoload section of the default composer.json.
start
Where the bootstrap directory contains the startup procedures that belong to the framework,
the start directory contains startup procedures that belong to your application. As always, some
sensible defaults have been provided for you.
storage
When Laravel needs to write anything to disk, it does so within the storage directory. For this
reason your web server must be able to write to this location.

tests
The tests directory will contain all of the unit and acceptance tests for your application. The default
PHP Unit configuration that has been included with Laravel, will look for tests within this directory
by default.
views
The views directory is used to contain the visual templates for your application. A default hello
view has been provided for your convenience.
filters.php
The filters.php file is used to contain the route filters for your application. You will learn more
about filters in a future chapter.
routes.php
The routes file contains all of the routes for your application. You don’t know what routes are? Well,
let’s not waste any more time then. Onwards to the next chapter!

laravel code bright的更多相关文章

  1. 50分钟学会Laravel 50个小技巧

    50分钟学会Laravel 50个小技巧 时间 2015-12-09 17:13:45  Yuansir-web菜鸟 原文  http://www.yuansir-web.com/2015/12/09 ...

  2. 50分钟学会Laravel 50个小技巧(基于laravel5.2,仅供参考)

    转载请注明:转载自 Yuansir-web菜鸟 | LAMP学习笔记 本文链接地址: 50分钟学会Laravel 50个小技巧 原文链接:< 50 Laravel Tricks in 50 Mi ...

  3. Laravel 精选资源大全

    原文链接  必备品 文档:Documentation API:API Reference 视频:Laracasts 新闻:Laravel News 中文文档 Laravel学院– Laravel 5. ...

  4. Github上的1000多本免费电子书重磅来袭!

    Github上的1000多本免费电子书重磅来袭!   以前 StackOverFlow 也给出了一个免费电子书列表,现在在Github上可以看到时刻保持更新的列表了. 瞥一眼下面的书籍分类目录,你就能 ...

  5. Github 的一个免费编程书籍列表

    Index Ada Agda Alef Android APL Arduino ASP.NET MVC Assembly Language Non-X86 AutoHotkey Autotools A ...

  6. laravel route路由,视图和response和filter

    Laravel充分利用PHP 5.3的特性,使路由变得简单并富于表达性.这使得从构建API到完整的web应用都变得尽可能容易.路由的实现代码在 application/routes.php 文件. 和 ...

  7. php框架推荐

    ThinkPHP,  国内开发的框架,特别容易入门,中文文档细致,表述准确. Laravel, 国外框架,非常高级的一个框架,特别是前端比较模块化,但入门难一些,速度不高. laravel在lampp ...

  8. Laravel5.5 的 Homestead 开发环境部署

    首先明白以下几个概念 VirtualBox  -- Oracle 公司的虚拟机软件, 能运行在当前大部分流行的系统上; Vagrant 提供一种命令行接口, 允许自动化安装虚拟机, 并且因为是脚本编写 ...

  9. 使用 visualstudio code 编辑器调试执行在 homestead 环境中的 laravel 程序

    由于之前做 .net 开发比较熟悉 visualstudio,所以自 visualstudio code 发布后就一直在不同场合使用 vscode ,比如前端.node等等.最近在做 laravel ...

随机推荐

  1. oracle数据同步方案

    数据同步方案:--用DBLINK 创建与所需同步表的链接------------------------------------------------------------------------ ...

  2. 规则引擎ILog和CKRule的对比

    IBM™ WebSphere™ ILOG是业界最有影响力的业务规则商业软件,它提供了最好的业务规则管理系统,在Java领域更是有广泛的成功案例.网上关于ILOG的技术资料非常多,大家都比较了解ILOG ...

  3. (转)linux下mysql的安装过程

    最近在linux安装了mysql,根据网上收集的资料和个人的操作过程,大概做了个整理,以便以后进行参考回顾. 1.下载mysql-5.1.36.tar.gz,并且解压. tar -xzvf mysql ...

  4. 给String添加reverse方法

    我们知道Array有个reverse方法,String则没有,但可以Array来实现,字符串有个split方法可以轻易的将String转换为Array. String.prototype.revers ...

  5. java之多态的使用

    首先,什么是多态?我们应该从什么角度来理解多态?其实,我们不妨把多态理解成一种事物的多种存在形态,比如,猫和狗都可以变成动物,而动物又可以变成猫和狗. 为了充分理解多态,我们可以从以下这几个方面来理解 ...

  6. [LCA & RMQ] [NOIP2013] 货车运输

    首先看到这题, 由于要最大, 肯定是求最大生成树 那么 o(n2) dfs 求任意点对之间的最小边是可以想到的 但是看看数据范围肯定TLE 于是暴力出来咯, 不过要注意query的时候判断的时候要 m ...

  7. (转)使用inotify、inotify_add_watch、inotify_rm_watch、read编写监控程序

    转自:http://blog.csdn.net/myarrow/article/details/7096460 inotify是什么 inotify是文件系统变化通知机制,在监听到文件系统变化后,会向 ...

  8. 九度OJ 1533 最长上升子序列 -- 动态规划

    题目地址:http://ac.jobdu.com/problem.php?pid=1533 题目描述: 给定一个整型数组, 求这个数组的最长严格递增子序列的长度. 譬如序列1 2 2 4 3 的最长严 ...

  9. Sheepdog HTTP API

    1.sheepdog中http simple storage中nginx后台配置文件模板留存: events { worker_connections 1024;} http { server { l ...

  10. WebClient以POST方式发送Web请求

    本例使用WebClient以POST方式发送Web请求并下载一个文件,难点是postData的构造,发送Web请求时有的网站要求可能要求 Cookies前后一致.其中application/x-www ...