Laravel is a popular MVC (Model-View-Controller) based PHP framework. It is built on top of several Symfony components. For running laravel in you system you need PHP 5.3.7 version or later installed.
Some of the features of Laravel Framework
1. Simple and Easy to Use.
2. Restful Routing.
3. Beautiful Templating (Laravel uses Blade Template Engine).
4. Composer Powered (Means you can manage all the dependency through composer).The beauty of Composer is the simplicity it brings to library/application installation.
How to Install Laravel 4
To install laravel, you need composer installed in your system. If you don’t know about composer check my previous article on composer.
I assume you have successfully installed composer on your system.
** If you installed composer globally, run this command on your terminal.
composer create-project laravel/laravel laravel_fesh/ --prefer-dist
** If you don’t installed composer globally then above command won’t work for you.
// If composer is not installed globally
php composer.phar create-project laravel/laravel laravel_fresh/ --prefer-dist
// Composer installation begins
Installing laravel/laravel (v4.1.18)
- Installing laravel/laravel (v4.1.18)
Created project in laravel_fresh/
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.4.3)
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/routing (v2.4.3)
- Installing symfony/process (v2.4.3)
- Installing symfony/finder (v2.4.3)
- Installing symfony/console (v2.4.3)
- Installing symfony/filesystem (v2.4.3)
- Installing symfony/debug (v2.4.3)
- Installing symfony/http-foundation (v2.4.3)
- Installing symfony/event-dispatcher (v2.4.3)
- Installing symfony/http-kernel (v2.4.3)
Once this done, now laravel is ready for use. Go to root directory you will see following folder structure.
If you still find any difficulty in installation of Laravel, do check the official website documentation.
Now everything is done, so let’s check by open it in browser. First create a VirtualServer. Open the terminal Go to the root directory (laravel_fresh/). And run this command.
php artisan serve
The following message shows in your terminal
Laravel development server started on http://localhost:8000
Now go to browser and check this URL http://localhost:8000. You will see the logo of laravel. Now your laravel installation is done. You can use them for development.
In next tutorial, i’ll talk more about laravel routes and artisan command.