Steps to setup laravel (php framework) on windows
1. Open terminal, go to folder where php.exe exists, for my machine it is c:\xampp\php\
2. Install composer (https://getcomposer.org).
Composer is a tool for dependency management in PHP. It enables you to declare the required libraries for your project and will install them in your project.
Type the command:
php -r "readfile('https://getcomposer.org/installer');" | php
This will make 'composer' get installed in the same folder. You should the file composer.phar there.
3.Next, download the laravel installer using composer
Type the command:
php composer.phar global require "laravel/installer=~1.1"
This would change the directory to your default user directory. You need to note that as it will be printed out in the command when installation begins.
This path should have this folder structure 'composer/vendor/bin'.
4. Copy this complete path and add it your PATH environment variable. so that you can access laravel from anywhere in terminal.
5. Once installed, the command 'laravel new' will create a fresh laravel installation in the directory you want.
for example, the command 'laravel new blog', will create a new directory 'blog' having latest laravel installation and dependencies installed.
6. Create a folder 'laravel' inside htdocs folder. Create first laravel project (rename project_name to your project name)
Go to this folder C:\xampp\htdocs\laravel
Type this command:
composer create-project laravel/laravel project_name --prefer-dist
Yo ! You are done !










