Install Laravel via Laravel installer in windows

Today I will explain how to install Laravel via Laravel installer in windows. Laravel 5 has new method to install via laravel installer on all operating systems like windows, ubuntu etc and for xampp or wamp. Installing laravel via laravel installer method on windows is much faster then composer. It require only few commands to install and will be instant install so it’s a quick method. Below I am sharing how to install laravel via laravel installer in windows.

Install Laravel via Laravel installer in windows steps

1. First we need to download composer to manage its dependencies.
2. After download composer, install composer on your system.
3. Run below command in windows command prompt to check composer has installed successfully

# to check composer
laravel composer
laravel composer

4. After composer installed successfully we need to install laravel installer via composer so open windows command prompt and run below command.

# to install laravel installer
composer global require "laravel/installer=~1.2"
laravel installer
laravel installer

5. Now we need to set PATH environment variable

# to set up env path
set PATH=%PATH%;%USERPROFILE%\AppData\Roaming\Composer\vendor\bin

PATH :- path is a location where composer installed “~/.composer/vendor/bin” on Windows path should be used:
“C:\Users\\AppData\Roaming\Composer\vendor\bin” so in above command added “%USERPROFILE%” so it will auto get your computer name.

laravel path-set
laravel path-set

For testing you can run command “laravel” to check if you have path setuped correctly

# command 

6. Now we need to change directory first, where we want to install laravel then run below command to install laravel.

# to install 
laravel new laraweb
laravel install
laravel install

Below commands will also help to run your application:

If vendor directory is missing
$ composer update

You need to have .env on your application folder. If you don't have .env copy from .env.example:
$ cp .env.example .env

now run below command to generate app key
$ php artisan key:generate

You have done with Install laravel via laravel installer in windows and open url on http://localhost/laravel/laraweb.