How to Install Laravel 10.x Framework Very Quick Tutorial

Sovary January 6, 2024 146
2 minutes read

Hello guys, Laravel framework is popular in nowadays for build system management and have huge community as well. Currently the latest version is Laravel 10.x. PHP framework is your choice, because there are various frameworks to build system base on your preferences and familiarity. Today I will help you to install or download fresh Laravel project to start your new project.

The minimum requirement to install Laravel 10.x is make sure your PHP version of 8.1 and composer version 2.6.6 which you can download from here

Install Composer

We will install composer in Windows. This composer will help us to manage the libraries and packages of your project, after install and setup in Windows enviroment; we can check composer by command below.

composer --version

Install Laravel 10

Now start launching your command prompt or Windows Power Shell. By default in Windows when you launch command prompt, your location directory is in C:\Users\Sovary> so you may need to change directory to the specific workspace where conveniently find the project. Now you can run below command with specific version of Laravel

composer create-project laravel/laravel:^10.0 YouProject

On the other hand, in case you want download latest version just leave version blank and the command should shown as below:

composer create-project laravel/laravel YouProject

The project directory will create and download Laravel files. After finished download Laravel project you will see folder YourProject.

If you want to do some command stuff, you have to enter into directory project. The below command will print the version of your Laravel

php artisan --version

Database Connection

In root directory you will see a file .env where contain configuration related to confidential information and so on. Let's me raise one of configuration is database connection. You will see some of text below for configuration.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password

Now you can run below command to start Laravel application

php artisan serve

After then you can go to browser and access to URL http://localhost:8000 you will see a homepage of Laravel that means you have installed success and correctly launched service.

You might Also Like:

Laravel  PHP  Laravel 10 
Author

Founder of CamboTutorial.com, I am happy to share my knowledge related to programming that can help other people. I love write tutorial related to PHP, Laravel, Python, Java, Android Developement, all published post are make simple and easy to understand for beginner. Follow him