Laravel Application Structure Example
Tags: laravel, laravelbasic
Published: 2022-04-20 07:09:13

Originally posted @ https://codeanddeploy.com visit and download the sample code: https://codeanddeploy.com/blog/laravel/laravel-application-structure-example

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-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-QR9zYjX4ufx980.webp?ctm=1636263806)

## Laravel Structure Directory

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

![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-Ng4pmHEvmlx980.webp?ctm=1636264067)

## 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-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-FnkjmfKDxDx980.webp?ctm=1636265259)
 

## Database
A directory that handles your application database files.


 ![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-cuyhUm5m6Zx980.webp?ctm=1636265367)

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

 

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

![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-ivv8tZ6KfAx980.webp?ctm=1636265439)


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

![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-BJyIpYZQuTx980.webp?ctm=1636265491)

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

![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-Jk2SaSFNEXx980.webp?ctm=1636265535)

## Tests
A directory that handles all your test cases.

![laravel-application](https://ecn-storage.s3.us-west-2.amazonaws.com/articles/laravel-application-structure-example-teHVn3MsCax980.webp?ctm=1636265583)

## Vendor
A directory that handles all package dependencies.

I hope this tutorial can help you. Kindly visit here https://codeanddeploy.com/blog/laravel/laravel-application-structure-example if you want to download this code.

Happy coding :)