0

In Laravel documentation, it explained one short paragraph on how to use installer to install Laravel.

First, download the Laravel installer PHAR archive. For convenience, rename the file to laravel and move it to /usr/local/bin. Once installed, the simple laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new blog would create a directory named blog containing a fresh Laravel installation with all dependencies installed. This method of installation is much faster than installing via Composer.

I am a Windows 7 user. After download the laravel.phar file, where should I store the file? I don't think there is any /usr/local/bin directory on Windows 7. How can I get the laravel command to be able to use in command window?

user1995781
  • 19,085
  • 45
  • 135
  • 236
  • possible duplicate of [Installing Laravel 4.1 in Windows 7 // Make .phar file globally available to windows command line](http://stackoverflow.com/questions/20829129/installing-laravel-4-1-in-windows-7-make-phar-file-globally-available-to-win) – gview Jun 12 '14 at 17:17

3 Answers3

2

Install laravel 5.2 via Laravel Installer in windows 7

Steps:

  1. Please make sure you have installed composer into your computer
  2. Open command prompt
  3. $ composer global require “laravel/installer”
  4. C:\xampp\htdocs> laravel new mylaravel

Youtube video guide: http://www.pranms.com/how-to-install-laravel-5-2-via-laravel-installer-in-windows-7/

Mamunur Rashid
  • 281
  • 4
  • 6
1

The laravel installer needs to be in your PATH (no matter which Operating system).

In Unix based systems, /usr/local/bin is in your PATH by default.

On Windows, you can add a folder to your PATH by doing like this:

  • Start the System Control Panel applet (Start - Settings - Control Panel - System).
  • Select the Advanced tab.
  • Click the Environment Variables button.
  • Under System Variables, select Path, then click Edit.

From http://windowsitpro.com/systems-management/how-can-i-add-new-folder-my-system-path

edi9999
  • 19,701
  • 13
  • 88
  • 127
0

It's a lot easier to install using Composer. Download the Windows Composer installer from the Composer Website and run it. Once it's installed you can run from the command line:

composer create-project laravel/laravel your-project-name

This will create the folder your-project-name and install Laravel in it. The advantage of using Composer it that it makes adding other packages to Laravel really easy.

RMcLeod
  • 2,561
  • 1
  • 22
  • 38
  • I think having both composer and the laravel tool is even better. Especially if you create laravel projects often. – edi9999 Jun 12 '14 at 17:30