Table of contents
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 Directory
App
It is the application directory that holds the core code of your Laravel project
Â
Â
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.
Â
Â
Database
A directory that handles your application database files.
Â
Â
Public
A directory that handles images, stylesheets, javascript, and public files.
Â
Resources
A directory that handles templates, language files (localization), and sass files.
Â
Â
Routes
A directory that handles all your routing such as api.php, channels.php, console.php, and web.php, etc...
Â
Â
Storage
A directory that handles your session, cache, compiled templates, and necessary files generated by the framework.
Â
Â
Tests
A directory that handles all your test cases.
Â
Â
Vendor
A directory that handles all package dependencies.
Read next