This Guidance Will Help You Install Laravel

This Guidance Will Help You Install Laravel

Through this article, we will guide you step by step in how to install Laravel on your computer. Spoiler: it’s super easy!

First, we strongly recommend you to download composer beforehand because it can manage Laravel’s dependencies. Starting with download a copy of the composer.phar and after you have the PHAR achieve, you can choose to keep it in your local project directory or use it globally with moving it to usr/local/bin.

After finish installing composer, you can start installing Laravel right away. There are three options for you to pick.

1. Via Laravel Installer

Download Laravel Installer using Composer.

composer global require “laravel/installer=simbol karaoke1.1”

When you’ve finished installing Laravel, make sure to place the ¬/.composer/vendor/bin directory in your path in order for it to be found when you run the laravel command in your terminal. Once you’re done, you can run a laravel new command :

laravel new sister

Downloading Laravel Installer using Composer has many advantages. For instance, the download process is faster (less than two minutes), the keyword is simple and easy to remember, and you will get the newest code and it’ll be automatically updated. However, it needs a strong Internet connection to download library and much things.

2. Via Composer Create-Project

You can install Laravel—after you finished installing Composer, of course—by running this command in your console:

composer create-project laravel/laravel {directory}4.2 –prefer-dist

This method is so much easier because it only needs one step to completing the download. Still, you need a strong Internet connection and the download process can take 10 minutes in average.

3. Via Download

After finished installing Composer, simply download the latest version of the Laravel framework (the newest version at the time this article is written is 4.2 version) and extract its content in your document root server (e.g. htdocs, www, or any relevant root server).
Note that if you want to update your Laravel library, use this command in your terminal:

php composer.phar update

This method doesn’t require the Internet connection, thus it is the most used method among developers. However, there is a chance the code you’ve already downloaded using this method is outdated. We actually don’t recommend using this method unless you want to use Laravel quickly and do not want to get confused with Composer.

Are you ready to use Laravel framework?

Sources: 1, 2