I am using windows 8 .I am using XAMPP.I installed XAMPP in D drive. My web root path is D:\php\htdocs. Location of php.exe file is D:\php\php. I would like to install Composer first then Laravel using composer. Could any one show me the whole process with step by step instruction ?? 
2 Answers
- Add Php installation path to Environment Variable.
- Cd to D:\xampp\php [Php Installation path]
- Install composer using, php -r "readfile('https://getcomposer.org/installer');" | php
- Create composer.bat file, using D:\xampp\php>echo @php "%~dp0composer.phar" %*>composer.bat
- Check the installation using composer -V.
- If it works fine, install laravel using the following command. composer create-project laravel/laravel myapp --prefer-dist
5 Comments
PHP PHP
 Thanks @Jeno Karthic for your reply. I used Environment Variable like this 
  D:\php\php. I followed your instruction. But my problem is it creates project in D:\php\php not in htdocs.Jeno Karthic
 now you need to CD(change directory) to your required folder. (D:\php\htdocs in your case) & Run the composer. It will work fine now.
  PHP PHP
 Thanks @Jeno Karthic. I tried your instruction but failed. Moreover my pc does not recognize this command.(
  composer create-project laravel/laravel myapp --prefer-dist). I used this command php composer.phar create-project laravel/laravel myapp --prefer-dist. ThanksJeno Karthic
 Have you added the Php installation path(php.exe) to system's environmental variable PATH. Where Composer.phar file is present
  Jeno Karthic
 What's happening when you run 'php composer.phar' from php installation location
  - Download and run the Composer Windows Installer from here: https://getcomposer.org/download/
- Go to web root directory D:\php\htdocs
- Run composer create-project laravel/laravel myapp, this will install laravel project inD:\php\htdocs\myappdirectory.
COMPOSER.Thanks