Mac Composer创建Laravel项目

1.安装Composer
https://www.runoob.com/w3cnote/composer-install-and-usage.html

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

镜像地址
更换成阿里镜像:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
更换成Laravel China镜像: composer config -g repo.packagist composer https://packagist.laravel-china.org
更换成中国全量镜像:composer config -g repo.packagist composer https://packagist.phpcomposer.com

2.Laravel项目
https://learnku.com/docs/laravel/6.x/installation/5124#52027b

项目名称为blog Laravel版本为6.*

composer create-project --prefer-dist laravel/laravel blog "6.*"

你可能感兴趣的:(Mac Composer创建Laravel项目)