Laravel – Set Environment PATH Variable on Windows

Seriously Mac user thinks of windows is not for work but Windows users have flexibility of development similar to different operating systems. Main task to set Frameworks and API’s, you need to set Environment Path Variable. Beside MAC, people love to use windows as their web development platform.  Here is the simple tutorial on how […]

Seriously Mac user thinks of windows is not for work but Windows users have flexibility of development similar to different operating systems. Main task to set Frameworks and API’s, you need to set Environment Path Variable. Beside MAC, people love to use windows as their web development platform.  Here is the simple tutorial on how to Set environment Path Variable in Laravel.

Anyways, here’s how to install the Laravel installer for Laravel 5…on a Windows (if you’re own a Mac…go read the actual instructions which were made only for you).

Following tutorial works for Windows 8 but you can use it for windows 7 also.

Method 1 (easy way)

  1. Run composer global require "laravel/installer=~1.1" from the commandline.
  2. Open you Environment Variables…
  3. Search “env”
  4. Go to “Edit environment variables for your system”
  5. Under “System Variables” select to “Path” and click “Edit…”
  6. Add ;C:\Users\YOUR_USERNAME_HERE\AppData\Roaming\Composer\vendor\bin to the end.
    Important: There must be a semicolon before it, and no slash or semicolon after it

Method 2 (The fun way)

  1. Go to Control Panel > System and Security > System > Advanced System Settings
  2. Go to the Advanced tab
  3. Click “Environment Variables…”
  4. Under “System Variables” select to “Path” and click “Edit…”
  5. Add ;C:\Users\YOUR_USERNAME_HERE\AppData\Roaming\Composer\vendor\bin to the end.
    Important: There must be a semicolon before it, and no slash or semicolon after it

2.1
2.1.1

Now run the composer self-update and you need to close the CMD, Start again the CMD. Because the currently opened CMD will not pick up the changes you made to the path, you have to start again and close old one.

Enjoy!

P.S. In fairness for years Mac users had to put up with the same thing so I know it’s karma, but still…us Windows users have it tough already…we’re using Windows 🙁

Narrated from Luke-Watts

Leave a Reply

Your email address will not be published. Required fields are marked *