Installing Laravel

Created on April 14th, 2015

Using the Laravel Installer makes it super easy to spin up a new copy of Laravel. From the command line you can simply type:

laravel new folder-name

and a new laravel project will be created in the 'folder-name' folder. To get composer installed globally, you'll need to run the following commands:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

And then you'll need to globally include the laravel installer:

composer global require "laravel/installer=~1.1"

Then enter the following in your .bash_profile, .bashrc, or .zshrc file depending on which terminal shell you are using.

export PATH="$PATH:~/.composer/vendor/bin"

Now, you'll be able to run the 'laravel new' command!

Installing with MAMP

If you are using laravel with the MAMP version of PHP, you'll also need to enter the following PATH inside of your .bash_profile, .bashrc, or .zshrc file:

export PATH=/Applications/MAMP/bin/php/php5.6.7/bin:$PATH

Dependig on your version of PHP in MAMP, you may need to change the 'php5.6.7' location above. Next, open up a new terminal session and type:

which PHP

And you should see that the version of PHP you are using in the shell is the PHP version associated with MAMP.


Links

Composer - https://getcomposer.org/

Laravel - http://laravel.com/

Laravel Docs - http://laravel.com/docs

Comments (0)