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. redirect_uri参数错误解决方法

    坑,微信改来改去的,找死人了,以前在“开发者中心”中,现在改在”接口权限“中了.

  2. IIS6.0、IIS7中的站点、应用程序和虚拟目录详细介绍

    这里说的不是如何解决路径重写或者如何配置的问题,而是阐述一下站点(site),应用程序(application)和虚拟目录 (virtual directory)概念与作用,已及这三个东西在IIS6与 ...

  3. 【JAVA】浅谈java内部类

    一.什么是内部类? 到底什么是内部类呢?通俗的讲,就是在类内部定义的类,包括定义在一个类的方法外面.方法里面或者代码块中. 二.为什么要使用内部类? 为什么我们要不走寻常路,把一个类定义在另一个类的内 ...

  4. asp.net 音乐播放器

    <HTML> <HEAD><TITLE>Playback Example</TITLE> </HEAD> <BODY> < ...

  5. mysql用户管理,权限管理

    mysql权限 相关操作: 授予的权限分为四组: 列权限:和表中的一个具体列相关,例如:使用update 语句更新test表中name 列的值 表权限:和一个具体的表的所有数据相关,例如:使用 sel ...

  6. centos 端口开放及关闭

    之前有讲过公司新买的服务器使用的是CentOS 5.5,部署好Tomcat之后却发现输入114.80.*.*:8080(即ip:8080)却无法显示Tomcat默认的首页.因为以前部署在Win Ser ...

  7. php 中文字符串首字母的获取函数

    这篇文章介绍了php 中文字符串首字母的获取函数,有需要的朋友可以参考一下 function chineseFirst($str) { $str= iconv("UTF-8",&q ...

  8. Sublime Text3注册码

    这是一个注册码-– BEGIN LICENSE -– Michael Barnes Single User License EA7E-821385 8A353C41 872A0D5C DF9B2950 ...

  9. python描述符descriptor(一)

    Python 描述符是一种创建托管属性的方法.每当一个属性被查询时,一个动作就会发生.这个动作默认是get,set或者delete.不过,有时候某个应用可能会有 更多的需求,需要你设计一些更复杂的动作 ...

  10. hdu 4358 Boring counting 离散化+dfs序+莫队算法

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4358 题意:以1为根节点含有N(N <= 1e5)个结点的树,每个节点有一个权值(weight ...