安装laravel
有两种方式
通过 Laravel
安装工具
composer global require "laravel/installer=~1.1"
安装后将~/.composer/vendor/bin
加入PATH
export PATH=$PATH:/root/.composer/vendor/bin
laravel new
命令建立一份全新安装的 Laravel
应用,例如: laravel new blog
通过 Composer Create-Project
composer create-project laravel/laravel myproject --prefer-dist
composer指定安装laravel版本
composer create-project laravel/laravel=5.2.* --prefer-dist
*
为具体的版本分支
如果需要 composer
laravel/laravel 的最新 master 版:
composer create-project laravel/laravel=dev-master laravel-dev-master