Laravel Application Directory Structure

By default, the directory structure of Laravel is meant to meet the requirement for both large and small application development. But there is a provision to organize your application according to the way you like. Laravel don’t put up any compulsion and restriction on locating your given class anywhere - providing the composer can is free to load that class automatically. So in this chapter, you will be learning about the two different directories of Laravel. So let us dig deep into it.

The Root Directory Structure of Laravel

This directory is one of the most important directories inside which you will find some other subdirectories. These are:

routes storage

Directory Description
app The app directory holds the base code for your Laravel application.
bootstrap The bootstrap directory holds all the bootstrapping scripts used for your application.
config The config directory holds all your project configuration files (.config).
database The database directory holds your database files.
public The public directory helps in starting your Laravel project and also holds other scripts (JavaScript and CSS) as well along with images required for your project.
resources The resources directory holds all the Sass files, language (localization) files, templates (if any).
routes The routes directory hold all your definition files for routing such as console.php, api.php, channels.php etc.
storage The storage directory holds your session files, cache, compiled templates as well as miscellaneous files generated by the framework.
test The test directory holds all your test cases.
vendor The vendor directory holds all composer dependency files.