DEV Community

Cover image for Laravel Application Structure Example
Code And Deploy
Code And Deploy

Posted on

Laravel Application Structure Example

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

Laravel Structure Directory

App

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

laravel-application

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

Database

A directory that handles your application database files.

laravel-application

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

Routes

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

laravel-application

Storage

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

laravel-application

Tests

A directory that handles all your test cases.

laravel-application

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 :)

Top comments (0)