Saturday, 20 January 2018

Features and Directory Structure of Laravel

What is Laravel ?

Laravel is a free, open-source PHP web Framework, created by Taylor Otwell and intended for the development of web applications following the model-view-controller (MVC) architectural pattern or design pattern.It has a very rich set of features which will boost the speed of Web Development. If you familiar with Core PHP and Advanced PHP, Laravel will make your task easier. It will save a lot time if you are planning to develop a website from scratch. Not only that, the website built in Laravel is also secure. It prevents the various attacks that can take place on websites.


Laravel Features 

Laravel offers the following key features −
Configuration management
Query builder and ORM (Object Relational Mapper)
Schema builder, migrations, and seeding
Template engine
Event and command bus

If you want to use Laravel and if you do not know how to install or setup Laravel on your localhost then check it out my article on "How to setup Laravel on Windows".

Directory Structure of Laravel

Root Directory 

The root directory of Laravel contains various folders and files as shown in the following figure.The directory structure which mentioned below is for Laravel 5.4.


app − This directory contains the core code of the application.
bootstrap − This directory contains the application bootstrapping script.
config − This directory contains configuration files of application.
database − This folder contains your database migration and seeds.
public − This is the application’s document root. It starts the Laravel application. It also contains the assets of the application like JavaScript, CSS, Images, etc.
resources − This directory contains raw assets such as the LESS & Sass files, localization and language files, and Templates that are rendered as HTML.
routes – This directory contains our route file of the application.
storage − This directory contains App storage, like file uploads etc. Framework storage (cache), and application-generated logs.
test − This directory contains various test cases.
vendor − This directory contains composer dependencies.

Apart from above folders, there are some files available in root directory like ".env", ".env.example", ".gitattributes", ".gitignore", "artisan", "composer.json", "composer.lock", "package.json", "phpunit.xml", "", "server.php" and "webpack.mix.js".

App Directory 

This is the application directory. It contains a variety of additional directories, which are described below −
Console − All the artisan commands are stored in this directory.
Exceptions − This directory contains your application's exception handler and is also a good place to stick any exceptions thrown by your application.
Http − This directory contains your controllers, filters, and requests.
Providers − This directory contains various service providers.

Previous Post
Next Post

post written by: Dhaval Thakkar

Dhaval Thakkar is an enthusiastic web developer who is passionate about learning new things and always ready to help other developers.Just Web Code is a way to provide web solutions to web developers.