XAMPP is a free and open-source web server solution stack that includes PHP, MySQL, and Apache. To install XAMPP on Windows, follow these steps:
Visit the XAMPP download page and download the appropriate installer for your Windows version.
Run the installer and follow the on-screen instructions. During the installation process, you can choose which components to install. Make sure to select PHP and MySQL.
Once installed, launch the XAMPP Control Panel and start the Apache and MySQL services.
Composer is a dependency management tool for PHP that is required to install Laravel. To install Composer on Windows, follow these steps:
Visit the Composer download page and download the Composer-Setup.exe file.
Run the Composer-Setup.exe file and follow the on-screen instructions.
You’ll also be prompted to select the install mode. Be sure to pick Install for all users (recommended).
Make sure to select the correct PHP executable during the installation process (usually located in the XAMPP installation folder under xampp/php/php.exe).
Click Next to move through the on-screen instructions then click Install.
To verify that Composer was installed correctly, open the Command Prompt and run the following command:
If the installation was successful, you should see the Composer version displayed.
You can use Composer, which is now installed, to install Laravel globally on your system. To do so, open the Command Prompt and run the given command:
composer create-project laravel/laravel app-name
This will automatically download all the relevant Laravel files to create a new project.
To verify that Laravel was installed correctly, open the Command Prompt and run the following command:
After a successful installation, you will be able to see the Laravel version.
With your new app project created, you will then need to start a server. To do this, type in the following:
php artisan serve
With the server started you should then be able to access your app project via your web browser. To do this, open your browser and go to the following: https://localhost:8000