What is Laravel?
Laravel is an open source PHP framework designed to make web applications easier and faster through built-in features. These features are part of what makes Laravel widely used by web developers:
How to Install Laravel on Windows
Before you follow the guide on how to install Laravel on Windows, there are a few things you need to prepare and install first to support the installation of Laravel on Windows. These supporting applications are:
- XAMPP application (Download Xampp)
- Composer (Download Composer)
After you download the 2 applications, please install them first starting from installing XAMPP.
If you have installed XAMPP and also Composer, then now you can install Laravel on Windows.
How to install Laravel on Windows consists of several steps, namely:
- Enter Command Prompt or CMD
- Enter the XAMPP folder (C:\xampp)
- Start Installing Laravel
- Check the Laravel Framework Installation in the Browser
Please refer to the following steps.
1. Enter Command Prompt (CMD)
The first step you have to do is enter the Command Prompt or CMD first. The trick is to click on the Win + R keyboard. Enter the word CMD then click OK.
2. Enter the XAMPP Folder
After that, direct your CMD or terminal to be in the file server directory. The location of the file server in XAMPP itself by default is in xampp/htdocs. You only need to enter the command below to enter the htdocs directory.
3. Start Installing Laravel
If you are already in the htdocs directory, you need to fetch and install the Laravel files in the Github repository. Enter this command in your terminal:
composer create-project --prefer-dist laravel/laravel nama_projectmu
If you have entered the code and click Enter, then Composer will start the process of retrieving Laravel data and also install Laravel into the directory that you specified earlier, namely htdocs. To avoid errors or interruptions during the Laravel data retrieval process, make sure your internet network is stable.
4. Check the Laravel Installation in the Browser
If the process is complete, in the /xampp/htdocs directory a new folder will appear with the project name you specified earlier.
php artisan serve
If your terminal says Laravel development server started after you use the code, then you can open the link that appears in the browser. The default is 127.0.0.1:8000. Later on the homepage will appear Laravel writing as below: