Laravel

Getting Started With Laravel PHP Framework

Laravel is a very powerful and popular MVC (Model View Controller) based framework, created for PHP web application. It is probably the most widely used PHP framework right now. It allows web developers to break down their source codes into smaller modules and make them look better, simpler and much cleaner to read and realize. It is a free and open source framework which was released under MIT License and the source code was hosted on GitHub. According to a recent report, Laravel is the most common and viewed PHP project on GitHub hosting service. Laravel framework came with a lot of useful features and functions. The main attraction of this framework is its user-friendly API (Application Programming Interface), which makes Laravel different from other PHP frameworks and enjoyment to work with.

Some of the notable features of this framework include:

Bundles: Bundles offer a modular packaging method to Laravel 3.x, with several bundled functions previously provided for easy inclusion to applications. Bundles are actually some small packages that you can easily download to include particular features in your web application, thus, preserving lots of coding time and stuff.

The Eloquent ORM (Object Relational Mapping): This feature gives a wonderful, easy Active Record Pattern based advanced PHP implementation for working with the database. Every database table has an equivalent “Model” that is utilized to interact with that database table.

Class Auto-loading: It ensures that correct classes will be loaded at correct time and saves lots of your coding time

Application Logic: This is an essential part of developed applications that can be implemented in your application either making use of controllers or straight into the route declarations.

Automatic Pagination: This interesting feature simplifies the process of applying pagination in website.

Reverse Routing: It specifies a relationship between the links and routes that enables us to generate links to the named routes. Whenever making links simply use the name of the routs and Laravel will immediately place the appropriate URIs (Uniform Resource Identifiers) for you. This also allows you to modify your routes in future time and Laravel will up-date all of the appropriate links automatically.

View Composers: These are basically logical blocks of code that are usually executed whenever a view is loaded.

Unit testing: This is a one of the most useful features of Laravel, which contains several unit tests that identify and prevent regressions in the application. Unit tests can be executed via the artisan utility.

Installation of Laravel

Prerequisites: Before installing Laravel, you must have following things.

The first thing you need is a compatible web server, for example Apache. Laravel uses PHP 5.3 version so it is also needed. In order to detect the file Mime type, the Laravel framework makes use of FileInfo Library. You must enable this by making proper changes in php.ini file to add this extension. It also makes use of a library for security purposes name Mcrypt. So you have to include this library before installing Laravel.

Installation: Download the latest version of Laravel from their official website http://laravel.com/

Extract the Laravel zip file and upload all the contents into your web server.

In the config/appliation.php file, give the value of the key option to a random, 32 characters string. Confirm that the directory storage/views is writable. Lunch your application in your favorite web browser. If everything is alright you should see a welcome page in your browser window.

About JohnathonK