Lompat ke konten Lompat ke sidebar Lompat ke footer

Tutorial How To Install Laravel 5.7 On Xampp Windows

Laravel is the most popular PHP framework today, more and more people are using this framework, even developers who are familiar with frameworks such as Codeigniter, Yii, CakePHP and others are moving to Laravel.

 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows
Many companies have started to migrate their systems to Laravel. This is very natural because Laravel does provide many new features that make it easier for developers to manage the project.

On this occasion AllTutorials will discuss how to install Laravel 5.7 on Windows, using XAMPP.

For the record Laravel 5.7 is the latest version when we write this article, and requires PHP version 7.1.3 and above and some extensions to be able to run it. Therefore, make sure you install XAMPP version 7.2.0 and above.

↪ Installing XAMPP on Windows

First we need to download and install XAMPP for Windows on the official apache friends site. Don't forget to download XAMPP version 7.2.0 which contains PHP version 7.1.3 and above.
 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows
Next, install the file that you downloaded earlier, by default XAMPP will be installed in the C:\xampp folder. You can also install it in another location. Next just stay Next until it's finished.
 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows
After XAMPP is successfully installed, you can access the XAMPP application to run Apache and MySQL, just click the Start button on both.
 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows
If the Apache server has been run then you can access the main page at http://localhost on a web browser.
 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows

↪ Composer

After you have installed XAMPP, then you will need to install the Composer. Composer is a management dependency or you can say a tool for managing packages (Package Manager/Management) related to PHP and certainly for Laravel as well.

You can download Composer on the website https://getcomposer.org.

↪ How to install Laravel on Windows

After PHP and Composer are installed, the time has come for us to install Laravel in Windows, make sure there is a c:/xampp/htdocs folder via Command Prompt (CMD) by typing the command:
cd c:\xampp\htdocs
Then run the command below to install laravel.
composer create-project laravel/laravel mylaravel "5.7.*"
This command will create a new folder named mylaravel in c:\xampp\htdocs.

When running the command, the composer will automatically download all the dependencies packages needed to run Laravel to the mylaravel folder, you need to wait until it's finished and make sure your internet connection is good.

When it's finished then you can see the mylaravel folder already contains the file structure as follows. 
 Laravel is the most popular PHP framework today Tutorial How to Install Laravel 5.7 on XAMPP Windows

↪ Running Laravel

To run laravel then go to mylaravel folder with Command Prompt (CMD), then run the following artisan command:
php artisan serve
Now you can access your Laravel webpage in the browser by accessing http://localhost:8000.