How to Install Laravel Framework in Windows

By installing three software, we can work in Lvr, so let’s know which angle is the software which we can install

  • Installing XAMPP
  • Installing Composer
  • Installing Laravel

Open the XAMPP download page. Go to https://www.apachefriends.org/download.html in your computer’s web browser.

2Scroll down to the “7.2.8 / PHP 7.2.8” heading. You’ll find it near the bottom of the list of downloads.

  • This is important; since Laravel requires PHP 7.13 or higher, you’ll need to make sure you don’t accidentally install an older version of XAMPP.

Click Download (32 bit). It’s a blue button to the right of the “7.2.8 / PHP 7.2.8” heading. This will download the XAMPP setup file onto your computer.

4. Open the XAMPP setup file. Double-click the downloaded setup file to do so.

Click Yes when prompted. This will open the XAMPP setup window.

6Navigate through the XAMPP setup process. Click through the XAMPP menus by doing the following:

  • Click Next three times.
  • Uncheck the “Learn more about Bitnami for XAMPP” box.
  • Click Next twice.

7Click Finish when prompted. This will open the XAMPP language preferences pop-up window.

8Click Save when prompted. Doing so will save your default language settings and open the XAMPP dashboard.

9. Start Apache. Click Start to the right of each of the “Apache” heading. This will turn on Apache. At this point, you’re ready to install Composer.

  • You can also do the same with the “MySQL” heading, but you’ll need to have MySQL installed in order to do so.

Installing Composer

2. Select the Composer download link. Click the Composer-Setup.exe link near the top of the page.

3. Open the downloaded Composer setup file. Double-click the “Composer-Setup” file to do so.

4Click Yes when prompted. This will open the Composer installation window.

5. Click Next. It’s at the bottom of the window.

6. Select XAMPP if necessary. If you have multiple different command line-based PHP options installed on your computer, click the one listed in the drop-down box at the top of the window, then click C:\xampp\htdocs in the drop-down menu.

Click Next twice. This option is at the bottom of the menu.

Click Install. It’s at the bottom of the window. Composer will begin installing.

9. Click Finish when prompted. Doing so signifies that Composer has been installed successfully.

Activating Composer

1Open Start. Click the Windows icon in the bottom-left corner of the screen.

2. Search for Command Prompt. Type in command prompt to do so.

3Right-click  Command Prompt. You should see it appear at the top of the Start window. A drop-down menu will appear.

4. Click Run as administrator. It’s in the drop-down menu.

5. Click Yes when prompted. Doing so opens Command Prompt with administrator privileges.

6. Enter the Composer validation command. Type in php composer.phar and press ↵ Enter.

Wait for Composer to finish updating. Once the update completes, you can proceed with installing Laravel.

  • If you receive an error when you run the “php composer.phar” command, you’ll need to manually change the Composer directory before you proceed with installing Laravel.

Installing Laravel

  1. Close and re-open Command Prompt. Doing so ensures that you don’t have any interference from past commands.

2. Enter the Laravel installation command. Type in composer global require "laravel/installer" and press ↵ Enter. Laravel will immediately begin to install.

3. Wait for Laravel to install. Once Laravel finishes installing, you’ll see the regular Command Prompt tag (e.g., “system32>”) appear below the list of commands. At this point, you can begin using Laravel as needed.

Dharmendra K