How To Install Laravel Framework On XAMPP | Wamp | AMPPS | Lamp

1
1494
How To Install Laravel Framework

In this chapter, we will learn how to install laravel framework. I am using windows OS & latest version of laravel framework which is 5.8 now. It needs PHP version 7.1.3 or higher. Make sure you have this PHP version installed in your system.

# Requirements

You can install it using two different methods

# Method 1: Installation With Laravel Installer

Open command prompt and use following command. Make sure you installed composer before using this command. A composer is a great tool for dependency management. You can install and update PHP libraries with this tool. After that, use the following command to install laravel globally.

composer global require laravel/installer

Open PHP project directory (htdocs, if you are using XAMPP or www, if you are using Wamp). Use the following command to install fresh new Laravel latest version. Now anytime if you want new Laravel installation only use the following command.

laravel new folder-name
# Method 2: Installation With Composer Create-Project

With this in mind, go to the PHP project directory and use the following command. It allows you to install the latest version of Laravel.

composer create-project --prefer-dist laravel/laravel folder-name

Furthermore, you can install a specific version of Laravel. To do that, you can use a specific version along with the above command.

composer create-project --prefer-dist laravel/laravel folder-name "5.8"
# Run Project

Finally, Open command prompt inside the project directory and type:

php artisan serve

As a result, it will start a development server on http://localhost:8000. In that case, keep running your command prompt. After that, you can visit http://localhost:8000 in a browser.

Besides, you can start a server in your own port too. To do that, amend the above code as follows. It will start a development server on a defined port.

php atisan serve --port=8001
Laravel Installation

Please keep support with comments and sharing. Thank you for reading this tutorial. Have a great day 🙂

Learn more about Laravel Framework

Next articleHow To Use Laravel Eloquent One To One Relationship
Welcome to the world of web development, where technology and creativity come together to bring ideas to life. My name is Keyur Gadher, and as a web development blogger, I am here to share my knowledge and experience with you. From front-end web development to back-end programming, I will provide you with valuable tips, tricks, and techniques to help you create beautiful and functional websites that are tailored to your specific needs. Whether you're a beginner or a seasoned pro, I am here to help you take your web development skills to the next level. Join me today and let's start coding!

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here