Installing Laravel 8 and Composer with XAMPP on Windows
Laravel is one of the greatest PHP frameworks that you can use for create web application and Restapi(API).
Laravel released its latest version on 8th September 2020, which is Laravel 8. Laravel releases a new version every six months.
How to install Laravel 8 on Windows with XAMPP
Installing Laravel 8 on windows is very easy. However, before we can enjoy the latest version of Laravel, we have to make sure that your system is compatible and make sure you have PHP 7.3.0 on your system.
If you don’t have PHP installed on your computer, don’t worry, I am here to solve your problem.
1. Installing XAMPP
XAMPP is one of the most popular cross-platform web server using mainly for local web development. Installing XAMPP on your system provides Apache, MySQL, PHP, and Perl packages.
2. Prerequisite to Install Composer On Windows
You need to install composer on the Windows system. If you already download/installed Composer. Then Follow step 3 process.
Composer is the dependencies manager of PHP. It helps to install dependencies
You can download the Composer:
* Go to the official composer website.
* Click on the download link.
*Click on the Composer-Setup.exe (it will install the latest composer version whenever it is executed.)
3. Installing Laravel 8
Open Your Cmd/Terminal and run the following command:
composer global require laravel/installer
This command will install the laravel 8 globally on your system.
4. Creating a new Laravel project
There are two ways to create a new Laravel 8 project. The first one is by using the command from Laravel itself:
laravel new your-project-name
Note: This command will not work if you not install laravel globally on your windows system.
Second way to install laravel.
composer create-project --prefer-dist laravel/laravel your-project-name
After creating the project. Go to your project root directory and run the following command
php artisan serve
This command will start the local server on your system.