通过 composer 安装 laravel

安装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
    原文作者:ingood
    原文地址: https://segmentfault.com/a/1190000006889034
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞