It assumes that a copy of PHP is already installed on your local system. If not, you can read how to install it here
Composer is a package and dependency manager. To install it, open a terminal and change to a new directory. Run this command:
curl -Ss getcomposer.org/installer | php
The results of this command will look like this:
You will see how it downloads and compiles the composer.phar script that we use to install Laravel. While there are many ways to set up a new Laravel application, we will do it using the Laravel Composer script. To install this script, run:
composer global require laravel / installer
Which will look something like this:
This will download and install all the framework files, as well as any dependencies it requires. The packages will be saved in the vendor directory. Once it’s downloaded and installed, you can run the following command:
laravel new uploadApp
You will see something like the following output:
Composer installs all the packages that Laravel needs to run. This may take a few minutes, so please be patient. When finished, run ls -al to see what has been installed.
Here’s a quick breakdown of directories in a typical Laravel application:
Now, let’s create the rest of the application and run it with a dedicated artisan command (to save ourselves the hassle of installing and configuring a web server like Apache or nginx). The .env file contains all the configuration values that the files in the / config directory use to configure the application. Internally, you will notice that the configuration value for various parameters is used internally by the application.