Laravel Directory Structure

In this section, we'll see the directory structure of Laravel.

Laravel Directory Structure

Root Directory:

App Directory:

The Root Directory

The App Directory

It contains all the core code of your application.

The Bootstrap Directory

It contains the app.php file which bootstraps the framework..

The Config Directory

It contains all of your application's configuration files.

The Database Directory

It contains your database migrations, model factories, and seeds.

The Public Directory

It contains the index.php file, which is the entry point for all requests entering your application and configures autoloading.

The Resources Directory

It contains your views as well as your raw, un-compiled assets such as LESS, SASS, or JavaScript.

The Route Directory

It contains all of the route definitions for your application.

The Storage Directory

It contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework.

The Tests Directory

It contains your automated tests.

The Vendor Directory

It contains your Composer dependencies.

The App Directory

The Broadcasting Directory

It contains all of the broadcast channel classes for your application.

The Console Directory

It contains all of the custom Artisan commands for your application.

The Events Directory

This directory does not exist by default, but will be created for you by the event:generate and make:event Artisan commands.

The Exceptions Directory

It contains your application's exception handler.

The Http Directory

It contains your controllers, middleware, and form requests.

The Jobs Directory

This directory does not exist by default, but will be created for you by the make:job Artisan commands.

The Listeners Directory

This directory does not exist by default, but will be created for you if you execute the event:generate or make:listener Artisan commands.

The Mail Directory

This directory does not exist by default, but will be created for you if you execute the make:mail Artisan command.

The Notifications Directory

This directory does not exist by default, but will be created for you if you execute the make:notification Artisan command.

The Policies Directory

This directory does not exist by default, but will be created for you if you execute the make:policy Artisan command. It contains the authorization policy classes for your application.

The Providers Directory

The Providers directory contains all of the service providers for your application.

The Rules Directory

This directory does not exist by default, but will be created for you if you execute the make:rule Artisan command. It contains the custom validation rule objects for your application.