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
- Download XAMPP from the official website.
- Run the installer and follow the on-screen instructions.
- Start the Apache and MySQL services in XAMPP.
Step 2: Install Composer
- Download Composer from the official website.
- Run the installer and follow the on-screen instructions.
- Open a command prompt and run the following command to verify the installation:
composer --version
Step 4: Install Node.js
- Download Node.js from the official website.
- Run the installer and follow the on-screen instructions.
- 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.
- 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
- 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;
// }
- Install the project dependencies using Composer:
composer install
- Open a command prompt and navigate to the project directory.
- 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
- Run the following command to migrate the database:
php artisan migrate
- Generate the application storage link by running the following command:
php artisan storage:link
- Generate dummy data by running the following command:
php artisan db:seed
- Start the Laravel development server by running the following command:
php artisan serve
- Also start the npm server by running the following command:
npm run dev
- 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. 🚀