Laravel Application Structure - W3school

The application is broadly divided into the root directory and app directory. The following section is dedicated to the files and folders of the Laravel’s root and app directories.

Laravel’s Root Directory

The root directory of Laravel contains the given files and folders.

* app – The app folder contains the complete code of the application.

* bootstrap – The bootstrap folder contains the script associated with the application bootstrapping.

* config – The config folder carries the configuration files.

* database – As the name suggests, the folder takes care of database migration and seeds.

* public – The initiation of Laravel application begins with this directory only. The public folder is a container of the assets of the application. The assets of the application include JavaScript, CSS, Images, and a few others.

* resources – Raw assets of the application is present in this folder. The raw assets of the application include LESS & Sass files, localization and language files, and Templates.

Also Read: Laravel Installations

* storage – The directory acts as the storage of the application. It contains file uploads etc. Framework storage (cache), and application-generated logs.

* test – The test directory is a home to all the test cases of the application.

* vendor – The vendor folder carries all the composer dependencies.


Laravel’s app directory

The app directory of the Laravel is having the following files and folders.

* Console – This directory is the storage of all the artisan commands.

* Events – Your application can raise any of the stored events of this directory. These events can notify the different parts of the application about the occurrence of a commanded action.

* Exceptions – The directory carries the exception handler for your application. You can also add other exceptions thrown by your programs.

* Http – It is storage of controllers, filters, and requests.

* Jobs – The jobs folder contains the stacked-up jobs for your application.

* Listeners – It is a home to Handler classes. The Handler classes perform a logic after it receives any information about event being fired.

* Policies – The policies directory contains numerous policies associated with the application.

* Providers – The information regarding the service providers of the application are stored in this folder.