2 Directory Structure
taylorotwell edited this page 2011-06-24 14:19:33 -07:00

The Public Directory

The public directory should be the document root of your web server. It is the home of the index.php file, which contains the entire request flow of a Laravel application. If you have any images, scripts, or other files that should be publicly available, they should also be placed in this directory. In fact, img, css, and js directories have already been created for you.

Having the public directory as the document root of your web server ensures that the other scripts making up your application cannot be accessed directly. All requests are forced to enter the application through the index.php file.

The System Directory

The system directory contains all of the Laravel framework classes. In general, you should not modify any of the files in this directory. If you do modify these files, you will need to take special care to not lose your modifications when upgrading Laravel.

The Application Directory

The application directory contains all of your routes, models, views, logs, cache files, and everything else that makes up your application. Your application is safely isolated in its own directory to make upgrading Laravel a breeze.

This directory contains numerous sub-directories, each of which is discussed in the relevant portion of this documentation.