Home » Creating First Laravel Project

Creating First Laravel Project

by Online Tutorials Library

Creating First Laravel Project

In this topic, we are going to create the first laravel project. To create the Laravel project, we will be using Git and Composer.

Following are the steps required to create a first laravel project:

  • Open the Git Bash window.

Creating First Laravel Project

  • Enter the ls command to know the current location.

Creating First Laravel Project

Currently, we are in the root directory.

  • Now we create a Laravel project in Xampp folder. First we need to move to the xampp folder where we create a new laravel project.

Creating First Laravel Project

In the above screen, cd c: command is used to move to the c drive and then we use the command cd xampp/htdocs/ to move to the xampp folder.

  • First, we use the ls command to view the list of projects.

Creating First Laravel Project

The above screen shows that list is empty, i.e., no projects are available in the xampp folder. Now, we first clear the screen, and create a new laravel project.

  • Create a new laravel project.

Creating First Laravel Project

In the above screen, we use the command composer create-project laravel/laravel firstproject.

where,

laravel/laravel: It is a vendor package.
firstproject: It is a project name.

Note: If we do not mention the version, then composer creates automatically new laravel project with the latest version.

We can also use below commands to create a new laravel project:

  • The below screen shows that installation of laravel is started.

Creating First Laravel Project
Creating First Laravel Project

  • Once the installation of laravel completed, an application key is created.

Creating First Laravel Project

  • After successful installation, move to the xampp/htdocs folder where we find the firstproject.

Creating First Laravel Project

  • Go to the firstproject folder and then click on the vendor folder where you will find all the dependencies.

Creating First Laravel Project


You may also like