, , , ,

How to install Laravel and create a Laravel project?

Posted by

If you want to make a project on Laravel. First, you will have to install Laravel then what procedure comes under the Laravel installation process?

For handling dependencies, we use a composer for Laravel. Make a wish you have a Composer installed on your system before you install Laravel. In this article, you will see the installation process of Laravel and how to create a Laravel project.

You will have to follow the paths given below for installing Laravel onto your local drive −

Path 1 − Go through the following URL and download composer to install it on your system.

Download Composer

Path 2 − After the Composer is installed, verify the installation by typing the Composer command in the command prompt as shown in the below-mentioned screenshot image.

Laravel Composer

Path 3 − Create a new directory anywhere in your local drive for your new Laravel project. After that, proceed to the path where you have created the new directory and type the following command there to install Laravel.

composer create-project laravel/laravel –-prefer-dist

Now, we will focus on the installation of version 5.7. In Laravel version 5.7, you can install the complete framework by putting the following command −

composer create-project laravel/laravel firstproject

The output of the command is as shown below −

Create Laravel project

The Laravel framework can be directly installed with the project branch which includes the latest framework.

Path 4 − The above command will install Laravel in the current directory. Start the Laravel service by executing the following command.

php artisan serve

Path 5 − After executing the above command, you will see a screen as shown below −

Laravel on Localhost

Path 6 − Copy the URL underlined in red in the above screenshot image and open that URL in the browser. If you will see the screen, it signifies Laravel has been installed successfully.

So if you have already installed all the required way up accurately, then start creating your first Laravel Project.

Installation Via Composer:

You will open the Command Prompt, and follow the commands:

composer create-project laravel/laravel project-app

cd project-app

php artisan serve

It will create a Laravel project with a folder name “ project-app”. Then go to the accurate directory and run the last command.
The “php artisan serve’ command is utilized for running the project on localhost.

The Laravel Installer:

Or, you may install the Laravel Installer as a global Composer dependency:

composer global require laravel/installer

laravel new project-app

cd project-app

php artisan serve

This way!!! Your first Laravel project will be created successfully and ready to build something amazing.

guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x