-
Notifications
You must be signed in to change notification settings - Fork 0
Laravel Setup
ellun edited this page Jun 21, 2017
·
2 revisions
A simple guide to setting up Laravel on your computer!
Laravel uses Composer to manage it's dependencies. So first lets make sure we have that installed!
Paste these lines in your terminal to get the latest version of composer.
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"
This will download, verify, run, and finally remove the installer for compser.
Now that we have composer installed, we can install Laravel!
composer global require "laravel/installer"
We now need to add $HOME/.composer/vendor/bin to our $PATH so that Laravel is executable.
$ echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bash_profile
$ source ~/.bash_profile
Congrats! Larvel should be ready to go. Simply run the following snippet to create a new project.
laravel new nameOfProject