0

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 ??

4
  • 1
    There are plenty of guides for this available. Personally I think you should use Laravel Homestead laravel.com/docs/4.2/homestead Commented Jan 3, 2015 at 3:54
  • Thanks @TheShiftExchange. Actually I am facing problem while I am installing COMPOSER.Thanks Commented Jan 3, 2015 at 4:18
  • Seconding Homestead - it's far and away the easiest way to get Laravel up and running on Windows. Basically, it's a virtual machine running on Linux but you can work directly on the files in Windows (gross oversimplification). Commented Jan 3, 2015 at 4:18
  • Yeah, Composer will work fine with Windows, but it's a little bit more involved and everything just works better with Homestead. Commented Jan 3, 2015 at 4:19

2 Answers 2

3
  1. Add Php installation path to Environment Variable.
  2. Cd to D:\xampp\php [Php Installation path]
  3. Install composer using, php -r "readfile('https://getcomposer.org/installer');" | php
  4. Create composer.bat file, using D:\xampp\php>echo @php "%~dp0composer.phar" %*>composer.bat
  5. Check the installation using composer -V.
  6. If it works fine, install laravel using the following command. composer create-project laravel/laravel myapp --prefer-dist
Sign up to request clarification or add additional context in comments.

5 Comments

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.
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.
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. Thanks
Have you added the Php installation path(php.exe) to system's environmental variable PATH. Where Composer.phar file is present
What's happening when you run 'php composer.phar' from php installation location
0
  1. Download and run the Composer Windows Installer from here: https://getcomposer.org/download/
  2. Go to web root directory D:\php\htdocs
  3. Run composer create-project laravel/laravel myapp, this will install laravel project in D:\php\htdocs\myapp directory.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.