Laravel is the most popular PHP framework. You can build any kind of web application using Laravel. If you are a beginner, I will show you step by step tutorial to install Laravel on windows. You can also read, How to Remove Public from URL in Laravel?
Download and Install XAMPP
XAMPP is the most popular local server software, which helps you to develop and run any application on your computer local server. To install or create a laravel project, You need to install XAMPP.
Download and Install Composer
Composer is a dependency manager for PHP. First, You need to download and install composer on your computer.
Install Laravel on Windows
To install the latest version of laravel, You need to ensure these server requirements.
- PHP >= 8.0
- BCMath PHP Extension
- Ctype PHP Extension
- cURL PHP Extension
- DOM PHP Extension
- Fileinfo PHP Extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PCRE PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
After installing XAMPP and Composer, Open Windows CMD (Command Prompt) or Power Shell. Then enter:
Now you need to create a project in laravel. To create a project enter
composer create-project laravel/laravel project-name
Replace project-name with your project name. An Example: we want to develop a website for a hotel using laravel, So we use the project name as hotel-website. Then press enter. It will download and install laravel automatically from the laravel server.
That’s it. Laravel was installed successfully.
Run Laravel Project
To run your laravel project enter
cd project-name php artisan serve
Then it will give you a localhost IP address to access your project. For me, it’s 22.214.171.124:8000. Now visit this IP address with any browser on your computer. That’s it.
Laravel Installation Video Tutorial
I hope you understand how to install laravel on windows. If you need any help regarding laravel, please comment below or contact me on Facebook.