Skip to main content

Guide to Install Laravel on Windows

This guide will help you install Laravel on your Windows machine. Laravel is a PHP framework that is used to build web applications. It is a powerful and flexible framework that makes it easy to build web applications quickly.

Prerequisites

Before you start, make sure you have the following installed on your Windows machine:

Step 1: Install XAMPP

  1. Download XAMPP from the official website.
  2. Run the installer and follow the on-screen instructions.
  3. Start the Apache and MySQL services in XAMPP.

Step 2: Install Composer

  1. Download Composer from the official website.
  2. Run the installer and follow the on-screen instructions.
  3. Open a command prompt and run the following command to verify the installation:
composer --version

Step 4: Install Node.js

  1. Download Node.js from the official website.
  2. Run the installer and follow the on-screen instructions.
  3. Open a command prompt and run the following command to verify the installation:
node --version

Step 4: Install Our Laravel Project

Note: If you are a developer please follow the below steps to install our Laravel project. If you are not a developer please use don't use the below steps only follow GUI steps.

  1. Extract our project files to the directory then in this folder have 2 folder documentation and core folder. Now copy the core folder to the htdocs folder.
cd ~/Downloads/laravel-project
  1. Comment the below line on /public/index.php file:
 if (! file_exists(__DIR__.'/../storage/installed')) {
header('Location: /installer/index.php');
exit;
}
// to

// if (! file_exists(__DIR__.'/../storage/installed')) {
// header('Location: /installer/index.php');
// exit;
// }
  1. Install the project dependencies using Composer:
composer install
  1. Open a command prompt and navigate to the project directory.
  2. Run the following command to install the project dependencies:
composer install

45 Create a copy of the .env.example file and rename it to .env. 6. Generate an application key by running the following command:

php artisan key:generate
  1. Run the following command to migrate the database:
php artisan migrate
  1. Generate the application storage link by running the following command:
php artisan storage:link
  1. Generate dummy data by running the following command:
php artisan db:seed
  1. Start the Laravel development server by running the following command:
php artisan serve
  1. Also start the npm server by running the following command:
npm run dev
  1. Open a web browser and navigate to http://localhost:8000 to view the Laravel project.

Conclusion

Congratulations! You have successfully installed Laravel on your Windows machine. You can now start building web applications with Laravel. If you have any questions, feel free to reach out to our support team. 🚀