laravel

Installing Laravel 4 on Windows 8 with WAMP for Beginners

As I had mentioned in my “Codeigniter, Dead?” post that the famous framework has probably come to it’s end, I found and fell in love with a new sassy framework, Laravel. It’s got all the kinks of CI and many things more. It’s RESTful, modern, simplistic, saves a lot of time, has a built in ORM named Eloquent and Templating Engine named Blade, is more secure and best-practice oriented.

 

People who used Python or Ruby on Rails usually get bored of PHP because of the simplicity and productivity of those languages. But PHP has got the highest amount of usage with the largest ecosystem there is. Laravel kept many people from migrating away from PHP and fall in love with it all over again.

 

But sadly, unlike CodeIgniter’s well laid out and super easy to grasp knowledge base, Laravel’s is not that easy to grasp, especially for novices like me. I’ve went over the Documentation over and over again until I finally found something that worked for me.

 

Here’s my development environment:

  • Windows 8.1 Pro,
  • WAMP 2.5 (Apache 2.4.9, PHP 5.5.12, MySQL 5.6.17)
  • A brain that understand programming only at the beginning level.

There are two ways you can make the installation happen. As per their installation guide, by the PHAR method (no idea what that thing means) and by using Composer.

 

I’m not a super geek. So i picked the easiest thing that worked for me. I used Composer to install it. Here’s how to install Laravel 4 on Windows 8 with WAMP server running:

  1. Go to https://getcomposer.org/ and download and install Composer.  During installation it’ll ask you for the ‘php.exe‘ file path. Just browse to the wamp/bin/php/php(version)/ directory and select php.exe and proceed as it asks.
  2. You’re half done.
  3. Now, go to your www folder or the web root directory that you have set. I’m a noob so mine is wamp/www
  4. Now click on the top File menu, click on Open Command Prompt > Open command prompt as administrator like shown in the image below: File Menu
  5. Let’s name our project laraveltest. So, once the Command Prompt is open, write / paste this code and press enter:

     
  6. This will create the laraveltest folder with the prefered distribution of Laravel from github’s Laravel depository.
  7. Now this may take a while, but once the download starts you’ll see something like this: Installing Laravel
  8. Once the installation is done, it’ll create  a lock file, generate and compile a bunch of stuff for you and set a complex application key for security for you: Installation complete
  9. At this point, you are ready, if you go inside the laraveltest folder, you will see this: Inside the folder
  10. You’re practically done! Now you can go ahead and create a virtual host and so on to make stuff work out easier but I started working on this straight away and everything worked out just fine. If you go to http://localhost/laraveltest/public/ you should be seeing the welcome screen :

Laravel is Installed

Voila, you is done :D (that’s not a typo). Now, I suggest that you set up a virtual host and then start working but this should be workable on right away.

The laravel Documentation takes a while to get acquainted to, especially if you are a noob like me. But once you’ve used it for a while it becomes comparatively clearer.

Hope this helps.

  • Mahjabin Shumi

    Thanks for the tutorial. Very helpful.

    • http://ykbks.com/ Yousuf Kamal

      Thank you. Glad it helped.