1,Install Composer

$ curl -sS | php $ sudo mv composer.phar /usr/local/bin/composer

2, Use Composer


Packagist is the main Composer repository. It aggregates all sorts of PHP packages that are installable with Composer. Browse packages or submit your own.

(2)create a project dir

mkdir tmp
cd tmp ### (3)download phpspec
composer require phpspec/phpspec <img src="/images/require-phpspec.png">

3,Create a project[learning-laravel-5] branch[dev-develop] based on laravel framework

composer create-project laravel/laravel learning-laravel-5 dev-develop run project:

php -S localhost:8888 -t public

3,Install laravel

(1)Via laravel installer

composer global require "laravel/installer=~1.1"


export PATH=$HOME/.composer/vendor/bin 使用laravel创建新项目:

laravel new blog
cd blog
php -S localhost:8888 -t public open http://localhost:8888 with browser,shows: Laravel 5

(2)Via Composer Create Project

composer create-project laravel/laravel myblog --prefer-dist
cd myblog
php -S localhost:8888 -t public


Laravel ships with scaffolding for user registration and authentication. If y would like to remove this scaffolding, use the fresh Artisan command:

php artisan fresh
Written on April 20, 2015