1.安装composer
2.安装完成之后再cmd中输入composer,出现COMPOSER,就可以了
3.将composer镜像改为国内镜像
composer config repo.packagist composer https://packagist.phpcomposer.com
4.在要安装laravel项目的文件夹下运行cmd,输入命令(安装指定版本)
composer create-project laravel/laravel your-project-name --prefer-dist "5.8.*"
如果要安装最新版本的laravel只需要运行下面的代码即可
composer global require "laravel/installer"
php artisan --version
D:\laravel\your-project-name>php artisan --version