Laravel utilizes Composer to manage its dependencies. So, before using Laravel, make sure you have installed Composer on your machine. For downloading the composer visit the official website https://getcomposer.org/download/.Here you can get the Composer-Setup.exe file. Download .exe file and run on your system.
After the successful installation of the composer, check the installation by typing the Composer command in the command prompt as shown in the following figure:
Now create a new directory inside htdocs folder (C:\xampp\htdocs\laravel-project) for your new Laravel project. After that, type the following command there to install Laravel.
composer create-project laravel/laravel –-prefer-dist blog
Here, we have provided project name as a blog. You can provide a project name as your wish. It will take a few minutes to install the complete project.
Make sure before typing the command you are inside the htdocs folder.
After the complete installation, visit the currently installed project directory i.e. C:\xampp\htdocs\blog.Then you will see as the below screenshot:
The above command will install Laravel in the current directory. Start the Laravel service by executing the following command.
After executing the above command, you will see the screen as follows:−
Copy the URL that is shown in the screen <http://127.0.0.1:8000> and paste and run that URL in the browser. If you see the following screen, it means that Laravel has been installed successfully.