Arrow

Laravel 8 installation

AuthorHariom Prajapati

Pubish Date24 Jul 2022

categoryLaravel

For managing dependencies, we need to install composer. Before installing laravel make sure you have installed composer on your computer system.

 

First of all, follow the below steps to install composer on your computer system.

Step 1 - Open the command prompt on your system.

laravel installation

Step 2 - Now copy and paste the below four scripts in your terminal one by one.

 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"


 php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"


  php composer-setup.php 


  php -r "unlink('composer-setup.php');" 

 

Step 3 - Now check file is downloaded or not by typing the 'composer' command in the command prompt.

If composer downloaded then it shows in command prompt like below figure -

laravel installation

Note -If you installed composer once on your computer system then don't need to install it again on the same computer system.

 

Step 4 - Now install laravel on your system using composer by copy and paste the below code to your command prompt.

composer global require laravel/installer

Note :- If you installed laravel once on your computer system then don't need to install it again on the same computer system.

 

Step 5 - Now you need to check  laravel installed on you computer system or not by typing 'laravel' in command prompt.

Note :- If you want to know the path of composer global installer then copy and paste the below code into commant prompt.

Command -

 composer global about

 

Step 6 - Now if you want to change path where you need to install laravel project folder then follow below command prompt. 

Command -

 cd full path

Note :- type full path of your location where you want to create new laravel project.

 

Step 7 - Now you are ready to create fresh new laravel project by copy and paste below code into command prompt.

 laravel new file_name

 

Step 8 - Serve your application now by start xampp server and then artisan command.

 php artisan serve


laravel installation

download xampp server from here download xampp and install it.

laravel installation

Now open and start apache and MySql server.

laravel installation

 

Copy 'http://127.0.0.1:8000' and paste it to browser and if you see below screenshot then you are perfectly installed laravel.

laravel installation