Laravel - Installation
Laravel uses composer to manage dependencies . Make sure Composer is installed on your system before installing Laravel. In this chapter, you will see the installation process of Laravel.
To install Laravel on your system, you will need to follow the following steps:
Step 1 − Visit the following URL and download Composer to install it on your system.
Step 2: Once Composer is installed, test the installation by typing the Composer command at the command prompt as shown in the following screenshot.
Step 3 − Create a new directory anywhere on your system for your new Laravel project. After that, navigate to the path where you created the new directory and enter the following command to install Laravel.
composer create-project laravel/laravel --prefer-dist
Now let's focus on installing version 5.7. In Laravel version 5.7, you can install the entire framework by issuing the following command:
composer create-project laravel/laravel test dev-develop
The output of the command is as shown below −
The Laravel framework can be installed directly with the development branch, which includes the latest frameworks
Step 4 − The above command will install Laravel in the current directory. Start the Laravel service by running the following command.
php artisan serve
Step 5 − After executing the above command, you will see a screen as shown below −
Step 6 - Copy the URL underlined in gray in the screenshot above and open this URL in a browser. If you see the following screen, it means that Laravel has been successfully installed.