Setting up Laravel development environment in windows

Pratik Kuikel
4 min readOct 22, 2023

--

Welcome aboard, fellow artisan, to the world of Laravel!
In this installment of our journey into Laravel, we will delve into the process of configuring a Windows environment for Laravel development. So, let’s get you through the steps necessary to prepare Laravel for takeoff, and together, we shall initiate this adventure.

Let’s dive straight into installing these tools.

  1. Installing Laragon
  2. Installing Composer
  3. Installing Git Bash
  4. Installing Visual Studio Code
  5. Installing Visual Studio Code Extensions For Laravel

1. Installing Laragon

  • To install laragon visit the laragon website download page and download the LARAGON FULL EDITION .
  • Run the downloaded file, select the language for installation, confirm the installtion folder for the laragon.
  • You can enable or disable auto start, auto detection, and auto creation of virtual hosts based on your preferences. Alternatively, you have the option to enable all of them for your convenience.
  • And finally click on Install.

With Laragon successfully installed on our machine and the latest PHP version readily available, it’s time to proceed with Composer installation.

2. Installing Composer

  • Download the composer setup file, Composer-setup.exe.
  • Run the downloaded file, select Install for all users recommended.
  • Don’t bother with Developer mode, just click next.
  • The exciting moment has arrived! In the Composer setup, click “Browse” to choose the command-line PHP. Navigate to the Laragon installation folder, go to “bin,” access the “php” folder, dive into the “php-x.x.x-win32-vs16-x64” folder, and select the “php.exe” file.

If you have followed the laragon installation steps carefully the PHP path should look something like C:\laragon\bin\php\php-8.2.3-Win32-vs16-x64\php.exe

  • Click “Next” and skip the proxy setup. Then, hit “Next” once more, and finally, click the “Install” button to start running Composer on your Windows device with the latest PHP version.

3. Installing Git Bash

  • Get the Git Bash setup file by clicking the “download” link at this Git Bash page git-bash.
  • Run the downloaded file.
  • You can either read the GNU General Public License if you enjoy reading such documents or just click “Next” like most people do without reading. 😉
  • There’s no need to toggle any components; simply click “Next” as usual.
  • Select Visual Studio Code as Git’s default editor and then click “Next.”
  • Let the git decide. “Next”.
  • Git from the command line and also from 3rd-party software, “Next”.
  • Use bundled Openssh, “Next”.
  • Use Openssl Library, “Next”.
  • Checkout windows style,”Next”.
  • Use MinTTY, “Next”.
  • Default, “Next”.
  • Git Credential Manager, “Next”.
  • Enable file system caching, “Next”.
  • Don’t enable any experimental options, “Next”.
  • Then finally “Install”. 🎉

4. Installing Visual Studio Code

  • Download visual studio code by clicking the “Download for windows” button ⬇️ vscode for windows
  • Run the downloaded file.
  • Agree to the terms like a responsible user,”Next”.
  • Click “Next” once more.
  • Press the “Install” button, wait for the installation to complete.

Congratulations, Visual Studio Code is now installed, and the tools are ready for use.

Next, we’ll add some helpful tools to Visual Studio Code for an easier experience when working with Laravel.

5. Installing Visual Studio Code Extensions For Laravel

Fortunately, there’s the Laravel extension pack created by Winne Lin, which lets you install all the essential extensions for a seamless Laravel development experience with just one click

  • Launch visual studio code.
  • Click on the Extensions icon in the sidebar on the left-hand side of the window. It looks like a set of square puzzle pieces or can be found under the square icon in the sidebar.
  • In the Extensions view, simply enter ‘Laravel extension pack’ into the search bar at the top and hit Enter. Look for the Laravel extension pack created by Winnie Lin and proceed to install it.

Now that you have all the necessary tools and services in place to start working with Laravel on Windows, take some time to explore and experiment. Try out various features of these tools, conduct research, and familiarize yourself with Laragon, Visual Studio Code, Git Bash, and Composer.

In this journey of setting up Laravel on Windows, we’ve set the stage for an exciting adventure in web development. We’ve successfully configured our environment and armed ourselves with essential tools, all ready to embark on this incredible voyage. Now, as you enter the realm of Laravel, remember that every line of code you write and every project you build is a step forward in your craft as an artisan. So, explore, create, and let your creativity soar. Your Laravel adventure has only just begun.

--

--