Table of contents

laravel structure

Laravel application structure is well-organized folders, sub-folders, and files provided from the framework. Below is the example default Laravel structure generated for the newly installed Laravel.


Once you installed the Laravel project it will generate the structures that are shown below.

 

laravel structure

 

Laravel Structure Directory

App

It is the application directory that holds the core code of your Laravel project

 

laravel structure

 

Console

A directory that contains your artisan commands

 

Events

A directory that caters for your Laravel projection events that handle sending messages or signals to other parts of your Laravel project.

 

Exceptions

A directory that caters to project exception handling, that handles all exceptions thrown by the Laravel project

 

Http

A directory that handles controllers, requests, and filters

 

Models

A directory that handles the Eloquent ORM that allows us to query data in our table, as well as insert new records into the table

 

Providers

A directory that handles all service providers for your Laravel project. Service providers help to bootstrap your application by binding services in the container and providing configuration for the Laravel application.

 

Bootstrap

A directory that handles the app.php file which bootstraps the framework. This directory also caters to a cache directory that consists of framework-generated files.

 

Config

A directory that handles your application configuration.

 

laravel project structure

 

Database

A directory that handles your application database files.

 

laravel structure

 

Public

A directory that handles images, stylesheets, javascript, and public files.

 

Resources

A directory that handles templates, language files (localization), and sass files.

 

laravel structure

 

Routes

A directory that handles all your routing such as api.php, channels.php, console.php, and web.php, etc...

 

laravel structure

 

Storage

A directory that handles your session, cache, compiled templates, and necessary files generated by the framework.

 

laravel project structure

 

Tests

A directory that handles all your test cases.

 

laravel structure

 

Vendor

A directory that handles all package dependencies.