DEV Community

Cover image for How to install Laravel project on your Windows 10 using Xampp
Sayandeep Majumdar
Sayandeep Majumdar

Posted on

How to install Laravel project on your Windows 10 using Xampp

Hello World

Welcome to my Blog. Hold your coffee till the blog's end.

Laravel is one of the great PHP framework to build web applications. Laravel comes with a range of advantages over other PHP frameworks. It is open source and entirely free. This makes it a preferred option for making customizations or adding new packages or functionalities.
Here are some statistic where you can predict the future of Laravel.

Alt Text

Alt Text

If you want know more information about the statistic.
Please go to https://www.similartech.com/technologies/laravel

Now let’s start our journey in Laravel framework. In this blog we will install and setup Laravel.

Install Xampp:

Xampp is the most popular PHP development environment. It is completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl.
We are going to install this Xampp. We know Laravel need PHP support. It will run in server and store data to database and both are included in Xampp.

Download Xampp from here: https://www.apachefriends.org/download.html

Alt Text

Install the latest PHP version. Laravel depends on PHP version. So when you are going to install Laravel also check the version. Here we will install Laravel 7.

Step 1:

Click on downloaded Xampp.exe file. You will notice a warning. Like this

Alt Text

Just click on Yes.

Step 2:

Now just click on “Next”.

Alt Text

Step 3:

Select the components to install with XAMPP. Actually we only need Apache, MySQL, and PhpMyAdmin. But here, I have selected all.

Alt Text

Step 4:

Now select the installation folder where all files will store.

Alt Text

Step 5:

At the end you did it. You have successfully installed Xampp on your machine.

Alt Text

Install Composer:

The composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. So we need to install the composer before installing Laravel. Just follow the below URL and download the Composer-Setup.exe file. Get Composer

Alt Text

Go to the website then click on the selected “Composer-Setup.exe” and download the file.

Open the exe file and then click next.

Alt Text

Alt Text

Now keep clicking on “Next” and it will install the composer.

Install Laravel

Install Laravel by issuing the Composer create-project command in your terminal.

Step 1:

Open your terminal and write down the below command

composer create-project --prefer-dist laravel/laravel:^7.0 yourproject
Enter fullscreen mode Exit fullscreen mode

Like this in your command prompt.

Alt Text

Now just sip a cup of coffee ☕ and wait …

It's on rolling.

Alt Text

Step 2:

Next,
Go to your project folder using cd command in cmd.

Alt Text

Step 3:

Now locally we will start our application using below command,

php artisan serve

By default your application will open at 8000 port
http://localhost:8000 paste it in your web browser.

Hurrah,

You have successfully installed Laravel on your machine.

Alt Text

Conclusion:

Here we have installed Xampp for server (PHP) support, composer (for easy install PHP packages), Laravel (PHP-framework) in windows machine. This is “Hello World” program for Laravel Developer.

Adios Developer 👏, See you in next blog.

Keep Learning, Keep upgrading

Top comments (5)

Collapse
 
jbkhellas profile image
JBKHELLAS

I am sorry but you are not using XAMPP to serve the project.. you are using the build in PHP server. You are only using the php installation of XAMPP...

Collapse
 
alaindet profile image
Alain D'Ettorre

I've used for quite some time, but I honestly think that at least using Laragon is a better experience, let alone Docker & co.

Collapse
 
webmastah_net profile image
Mirek @ webmastah.net

Forget xamp, its soo 2012. We are now in era of containers 😏

Collapse
 
sayandeepmajumdar profile image
Sayandeep Majumdar • Edited

Yes brother. :)
I'm in learning phase.

Collapse
 
sayandeepmajumdar profile image
Sayandeep Majumdar

That's right and thanks for the resource suggestion.
And I'm still in learning phase (Docker)