Understanding Application Structure of Laravel 5.4 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 below folders.
Laravel’s Bootstrap Directory
The bootstrap directory of Laravel contains files are used for bootstrapping and configuring Laravel Framework itself.This directory is also contains a cache directory which holds all framework generated files for performance optimization and
Laravel’s Config Directory
This directory contains all configration related files of laravel Framework.In this directory consist of below files
Laravel’s Database Directory
Laravel’s Database Directory is used to kept your database migrations and seeds.If you are going to use SQLLITE Dtabase, then you can also use this directory to hold and SQLLITE DB.
Laravel’s Public Directory
The public directory of laravel consist oof afile 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 coompiled 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
Laravels Vendor Directory
The vendor directory contains Composer dependencies related files of your application.