rojina dawadi
2 min readJul 23, 2021

--

How to create a new project in Laravel

Inside htdocs folder, use the command composer create-project laravel/laravel first project where,

  • laravel/laravel: It is a vendor package
  • firstproject: It is a project name.
  • Once the installation of laravel completed, an application key is created.
  • After the project is successful installed, now move to the xampp/htdocs folder where we find the firstproject.
  • Go to the firstproject folder and then click on the vendor folder where you will find all the dependencies. Now open the project using any of the IDEs and run install composer in the terminal. After successful installation, move to the xampp/htdocs folder where we find the firstproject.
  • Go to the firstproject folder and then click on the vendor folder where you will find all the dependencies.
  • Now open the project using any IDEs of your choice and run composer install in the terminal. This will download and install the framework’s dependencies.
  • After then we need to add these information on .env file DB_DATABASE,DB_USERNAME and DB_PASSWORD. These are the same value that you have when creating a database. Usually we keep username as root and password empty.

After making connection with database we are ready to go . Run command php artisan serve to run the application.

--

--