Need Of Framework:
1.Reusability : The main reason to use a framework is to improve code reusability. The framework separates UI from backend which improves flexibility of the code (separation of concerns).
2.Stability : The PHP framework gives large stability to the code.
3.Security : PHP is very forgiving language, so it keeps loose end in the code. So a framework assures you to improve from those loose ends.
History:Taylor Otwell, a .net developer in Arkansas, was using CodeIgniter when the first seeds of Laravel were planted. “I couldn’t add all the features I wanted,” he says, “without mangling the internal code of the framework.” He wanted something leaner, simpler, and more flexible and he found the way for it by inventing Laravel framework.
The laravel frame work is based on MVC(Model View Controller) Structure.
1.Model: Model is based on real world scenario like car model or product of specific category. Models are permanent i.e. they are not going to change. The models are stored in databases. The model acts as a gatekeeper and a data store.
2.View: The View performs normal representation of data. After views work is done data is displayed. The only purpose of view is to display the processed data.
3.Controller:The intermediate between Model and View is known as Controller. The controller does all the actions between model and view. It takes input and processes model and gives its output through view for display.
Key Features of Laravel:
Laravel 5 is discovered in November 2014 with additional features compared with other frameworks of PHP.
New Directory Structure: In new directory structure all classes are fully name structured and well placed without effecting working as of previous versions.
Route caching:You can manage route caching if you are working on big projects increase the speed.
Multiple File Structure:Laravel supports multiple file structure. It uses Flysystem to suite multiple file structures.
Command Line Interface known as Artisan supports various operations to be done through CLI, which provides user friendly. The Artisan gives availability to add new custom commands used for application specific recurring tasks.
Comparison of Laravel Vs Codeigniter
a) Routing is Simple a) Routing is comparatively difficult
b) It is developed on PHPs latest versions b) Compatible with PHPs previous versions
so it does not support PHPs previous versions
c) It offers modular separation. C) It does not offer modular separation.
The framework can be selected as per requirement whether it may be E-commerce site or it may be informative site.