Creating First Laravel Project

Creating the Laravel Project

For creating the Laravel project, we are going to use a “Git”.

If you don`t have a “Git” software and also don`t have the knowledge to install it, then click here.

Let`s create a Laravel project:

  1. In the Git bash window, go to the xampp/htdocs folder.
Creating the Laravel Project 1
  • Then write command for creating a Laravel project

composer create-project laravel/laravel firstproject”.

(firstproject is our project name).

Creating the Laravel Project 2

Note: Use the command below to create a new Laravel project

composer create –project –prefer-dist laravel/laravel yourprojectname 5.2.29or

“composer create-project laravel/laravel codehacking 5.2.31 –prefer-dist.”


 (5.2.29 & 5.2.31 both are laravel versions, if we didn`t mention version, then the composer will automatically install the latest Laravel project).

  • The installation will start after giving the create project command to the composer.
Creating the Laravel Project 3

Note: If we got an error, try doing

composer install –no-scripts, then

composer install

or

composer dump-autoload

composer install –no-scripts

composer update

Creating the Laravel Project 4
  • Once the installation is completed, it will generate an application key.
  • Then, we can go to the xampp/htdocs folder. Where we can find our firstproject folder which is created by the composer.
Creating the Laravel Project 5
  • In the vendor folder of our firstproject, we can find all the dependencies.
Creating the Laravel Project 6