Table of contents
In this post, I will show you a Laravel installation using Windows. Usually, these steps can be applied to any machine. Take note that before we can install Laravel we need to have a Composer installed on your system.
Â
Just follow the steps below to learn how to install Laravel onto your system.
Â
Step 1: Composer Installation
Before installing Laravel we need to install the first composer if not yet installed on your system. Just click the link below to install it.
Â
https://getcomposer.org/download/
Â
Step 2: Verify Composer if Installed
Once the composer installs let's check to verify if our composer is successfully installed in our system.
Â
Once we run the composer command and display the composer's details then our composer is ready and let's install our Laravel project.
Â
Step3: Directory Laravel Installation
Usually, if you are using Xampp install on your Windows we use htdocs directory to install our Laravel project. So let's open your htdocs folder to your XAMPP directory. In my example, I name my xampp folder to PHP8 because I already have multiple versions of PHP in my system.
Â
Open your command prompt then point to your xampp directory then run this command:
cd htdocs
Â
Once you are inside the htdocs directory let's install a Laravel project.
Â
Run the following command:
composer create-project laravel/laravel laravel-blogs
Â
As you can see in my command the name of our Laravel project is laravel-blogs you can change it with your project name.
Â
Now, we installed successfully our Laravel project.
Â
Step 4: Run Artisal after Laravel installation
Let's access our Laravel installed folder called laravel-blogs so that we will test to run our artisan command.
Â
Run the following commands:
Â
cd laravel-blogs
Â
Next, run the artisan command:
php artisan serve
Â
Step 5: Laravel Installed Project Running
Once we hit the command above our Laravel project is now running. See the below screenshot.
Step 6: Run on Browser
Now, let's copy the URL http://127.0.0.1:8000 to your browser. And this is the result now:
Â
As you can see we successfully installed Laravel with Laravel 8 version. I hope it helps. Thank you for reading :)
Read next