Installing Laravel 8 is easy, but we will need to install XAMPP or WAMP server and Composer before doing so. In part 1 and part 2, we will install XAMPP and Composer first, and then we will download and install Laravel 8.
Part 1: Install Xampp server
Part 2: Install Composer
Part 3: Download and Install Laravel 8
Part 1: Install Xampp server
In this tutorial, we will install the Laravel 8 framework on the XAMPP server. To set up XAMPP, follow the instructions below:
Step 1: Go to ApacheFriends download page in your favorite web browser to open the XAMPP download page
There are three available versions for the XAMPP windows on this page, including 7.4.27/ PHP 7.4.27, 8.0.14/PHP 8.0.14, and 8.1.1/PHP 8.1.1. Now we are going to download the latest version.
Step 2: Click on the 8.1.1/PHP 8.1.1 link to download it. It takes a few minutes for the XAMPP installation setup to download
Step 3: Now, double-click on the downloaded XAMPP setup file to begin the installation process
Now click on “Next” to continue with the installation.
Step 4: Now select Xampp components to install and click “Next”
Step 5: Now, browse your computer to select the installation file.
In this post, we will install it in the Xampp folder. Click on next, and the installation process begins.
Step 6: Launch your XAMPP server and start all the services as soon as the installation process completes
Open your browser and open http://localhost/dashboard/ to test whether our XAMP works
Our XAMP server works perfectly well. Now we are ready to install our composer
Part 2: Install Composer
Simply follow the steps below to install composer:
Step 1: On your browser, open https://getcomposer.org/download/ to access the composer set-up download link
There are several ways of downloading the Composer, however we are going to work with Windows installer.
Step 2: Select the windows installer and click on the Composer-Setup.exe. This link will download the latest composer version
The download process will take a few minutes.
Step 3: Open your downloaded composer installation setup to begin the installation process. First, you will be prompted to Choose the Installation options. Check on the “Developer mode” installation option and click “Next” to continue
Step 4: Now, choose the command-line PHP you would like to use
Select the C:\Xamp\php\php\php.exe and click "Next."
Step 5: Now, configure your Proxy settings and click "Next."
Step 6: Our composer is ready to install. Click on “Next” to start the installation.
The installation process takes a few minutes.
Once the installation process completes, open your windows command prompt and run the Composer command to check on the version of the composer installed
That's it, our composer version 2.2.4 has been installed successfully. We have completed the installation of the two Laravel 8 prerequisites; let us now move to the installation of Laravel 8
Part 3: Download and Install Laravel 8
In this part, we'll install Laravel 8 with the Composer command. Follow the steps below to get Laravel 8 set up.
Step 1: Launch your Windows command prompt.
Step 2: Now, run the following command to install the Laravel 8: composer global require "laravel/installer"
composer global require "laravel/installer" |
Step 3: Now that Laravel 8 is installed, we can create a new Laravel project. To create a new Laravel project, execute this command: composer create-project --prefer-dist laravel/laravel FirstProject
composer create-project --prefer-dist laravel/laravel FirstProject |
Having installed Laravel, we need to check whether it works by opening the Laravel application in the browser. To do this, run the command: php artisan serve. This will generate a Laravel application URL. Open it in the browser
php artisan serve |
Our Laravel version 8.80.0 has been successfully installed. That’s it.
Conclusion
We have successfully installed Laravel 8 on our computer by the end of this chapter. We have also installed the XAMPP server as well as the composer. In the next chapter, we will learn about the structure of the Laravel application
Article Contributed By :
|
|
|
|
2652 Views |