11.08.2017 Views

codebright

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Getting Started 47<br />

• autoload.php<br />

• paths.php<br />

• start.php<br />

The bootstrap directory contains a few files that relate to the startup procedures of the framework.<br />

The autoload.php file contains most of these procedures, and should only be edited by experienced<br />

Laravel users.<br />

The paths.php file builds an array of the common filesystem paths that are used by the framework.<br />

If for some reason you decide to alter the directory structure of the framework packages, you may<br />

need to alter the contents of this file to reflect your changes.<br />

The start.php file contains more startup procedures for the framework. I don’t want to dig into<br />

these in detail right now as that may cause unnecessary confusion. Instead you should probably<br />

take note that framework environments can be set here. If you don’t know what the environments<br />

are used for then don’t worry. We will cover that later!<br />

Simply put, the contents of the bootstrap directory should only be edited by experienced Laravel<br />

users who need to alter the shape of the framework on the filesystem. If you are new to Laravel,<br />

then just ignore it for now, but don’t delete it! Laravel needs this directory to function.<br />

vendor<br />

The vendor directory contains all of the composer packages that are used by your application. This,<br />

of course, includes the Laravel framework package. For more information about this directory please<br />

refer back to the Composer primer chapter.<br />

public<br />

• packages/<br />

• .htaccess<br />

• favicon.ico<br />

• index.php<br />

• robots.txt<br />

The public directory should be the only web facing directory of a Laravel application. It’s normally<br />

where your assets such as CSS, Javascript files and images will live. Let’s have a closer look at the<br />

contents.<br />

The packages directory will be used to contain any assets that need to be installed by third party<br />

packages. They are kept in a separate directory so that they don’t conflict with our applications own<br />

assets.<br />

Laravel 4 ships with a standard .htaccess file for the Apache web server. It contains some standard<br />

configuration directives that will make sense for most users of the framework. If you use an<br />

alternative web server you can either ignore this file or delete it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!