Understanding Application Structure of Laravel 5.5 Framework
Laravel provides clean and easy to understand configurable application directory Structure. After installing Laravel successfully in root folder you will find below directories or files that are used to create small to large scale PHP Projects using Laravel Framework.
Laravel’s App Directory
App Folder is one of major folder/directory in Laravel Framework, In Laravel Most of logics are written in App folder.This folder/directory contains following folders.
Laravel’s Bootstrap Directory
The bootstrap directory of Laravel contains files are used for bootstrapping and configuring Laravel Framework itself.This directory also contains a cache directory which holds all framework generated files for performance optimization and
Laravel’s Config Directory
This directory contains all configuration related files of Laravel Framework.In this directory consist of below files
Laravel’s Database Directory
Laravel’s Database Directory is used to keep your database migrations and seeds.If you are going to use SQLLITE Database, then you can also use this directory to hold and SQLLITE DB.
Laravel’s Public Directory
The public directory of Laravel consists of a file named index.php.In Laravel this file is an entry point for your application.This directory also holds your public assets like images, js, CSS files.
Laravel’s Resources Directory
Laravel’s Resources directory contains all view files oof your application.This directory also hold your language files
Laravel’s Routes Directory
The routes directory of Laravel contains all of the routes of your applications. web.php, api.php, console.php and channels.php are default routes files that are included in Laravel 5.4
- web.php:-This file contains all routes that RouteServiceProvider places in web middleware group which provides session state, CSRF protection, and cookie encryption.
- api.php:-This file contains all routes that RouteServiceProvider places in the API middleware group, which provides rate limiting.
- console.php:-In this file you may define all of your Closure based console commands.
- channels.php:- In file you may register all of the event broadcasting channels that your application supports
Laravel’s Storage Directory
The storage directory of Laravel contains all of your compiled blade files, sessions files, file caches, and other files generated by the framework.
The storage/app/public is available for storing user-generated files, such as profile image, product images etc
Laravel’s Tests Directory
The tests directory contains all of your automated tests
Laravel’s Vendor Directory
The vendor directory contains Composer dependencies related files of your application.