In this post, we'll see how to install or create a Laravel application using Composer.
- An OpenSSL extension for PHP
- A PDO extension for PHP
- Mbstring extension for PHP
- Tokenizer extension for PHP
- XML extension for PHP
Laravel implements a composer for managing dependencies within it. Hence, before the use of Laravel, it needs to check whether you have a composer setup on your system or not.
If you don't have Composer installed in your system, first visit the URL below to download Composer and install it on your system. https://getcomposer.org/download/
After installing composer go to the command prompt and type composer. if it produces the following output then you have installed composer successfully.
Setup Laravel using the installer
After installing Composer you have to download the Laravel installer using composer. For that go to the command prompt and enter the following command.
composer global require "laravel/installer"
When the installation is done, a new command of Laravel will start a new fresh installation in that directory you provide.
laravel new projectname
The command mentioned above will make Laravel installed on that specific directory. To run the application navigate to projectname folder and give the next command which is below.
The above command will start the Laravel application and shows a message like Starting Laravel development server: http://127.0.0.1:8000.Copy URL and paste it into your browser and it will display the following output.
In the above example, we have created a new Laravel application using composer by a few commands. Now, you are ready to create an excellent web application using Laravel.