The first thing required for installing Laravel with Composer is to have Composer installed on your machine. After that, you have to download the installation package for Laravel in Composer. You can do this using the following command:
composer global require laravel/installer
If the command is completed successfully you will see an output similar to the one shown below:
You can create a new Laravel application using one of the following ways:
- Open the directory where you want to put your application and enter the command “laravel new”. This will install Laravel in the current directory.
- Using the command “laravel new <project>”. It will create a directory with the name <project> and install the application inside it.
- Using the command “composer create-project –prefer-dist laravel/laravel <path>. The <path> is the location where you want to install Laravel.
After the installation is completed you will see an output like the one shown below:
Was this article helpful?
If you have any suggestions or questions, please leave a comment below.
Leave A Comment