As Laravel is catching the attraction of every developer and most of open source web developers are migrated to Laravel framework. Most of the developers are lazy like me who just skip the thought of getting use to anything new which require a little bit of extra work in setting up a new environment for developing. Well i decided to give Laravel a try, made my mind for setting up Laravel on my PC, and I found the installation process very easy (which I once thought a tedious and complicated task).This quick laravel tutorial is for those who want to give Laravel a try and explore the power and simplicity of Laravel framework. I am sure you will love this laravel tutorial for its simplicity and being to the point while eliminating the complexity.
Installing laravel on Xampp
If you do not have XAMPP installed on your PC, download and install XAMPP. You are free to use any server you feel comfortable with, but this tutorial i am using XAMPP.
Download and Install Composer:
After installing XAMPP, it’s time to download and install Composer for Laravel. In PHP Composer is a dependency management tool which grants you the libraries declaration on which your project depends on, In short Composer manage (install/update) libraries dependencies for us.
Select the same directory where XAMPP is installed, in my case i have installed XAMPP to C:\xampp2, then select php.exe located in php directory in your XAMPP folder.
Confirm if Composer is Installed Successfully:
When Composer is installed open command prompt, type composer and press enter. If the Composer is installed correctly you will get result like the following screenshot.
After the confirmation of composer installation now we are ready to install Laravel, so open command prompt and enter this command “composer create-project laravel/laravel laravel5-upaaetest” in which “laravel5-upaaetest” is the name of our project directory, you can specify any project name you like.
The above command can be executed from anywhere in command prompt, you do not have to be at “xampp\htdocs” directory. After executing the above command wait until you get success message like the one in below screenshot.
Laravel installation may take a few minutes depending on your internet connection speed.
Check if Laravel is Working:
Open/Run XAMPP server and start Apache and mysql.
When you have Apache and MySQL running, open your favorite browser and type “localhost/laravel5-upaaetest/public” in the address bar. If you have completed all the steps correctly you will get this window shown in the following screenshot.
If you get any error like “Failed to clone” OR “git was not found” then you should log in to github.com and try this command again “composer create-project laravel/laravel laravel5-upaaetest”.