Hi Artisan, today I am going to explain you how to install Laravel 9 with composer. I will explain and show step by step to install composer and Laravel project.
To install Laravel 9 project you have at least composer version 2.3.7+ and PHP version 8.0+
Before we can download laravel we have to download composer and install it. If you already installed composer, you can check composer version run command below:
composer --version
Launch command prompt (cmd), and run command as below
composer create-project laravel/laravel blog
See image below:
After completed download you will see a folder named blog which is contain laravel files. We can check Laravel version but to do that we have to enter directory Laravel project by command
cd blog
To check your Laravel version with command below:
php artisan --version
In Laravel root directory you will see a file named .env. There is afew configuration related to your credential information. To connect with the database you have to modified following credential
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 we can run the project with below command
php artisan serve
Then we can go to browser and see first home page laravel project via http://localhost:8000
Hope you can install successfully and run Laravel project. Thanks
Laravel PHP Laravel 9Founder 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