windows-composer-laravel安装

步骤一:安装composer

 
https://getcomposer.org/
默认安装 勾选PHp启动程序
composer
创建目录 -》 新建 composer.json
编辑文件
{
  “require”:{
      "monolog/monolog":"1.20.0"
   }
}
执行命令: composer install
 
 
;composer require phpmailer/phpmailer  安装email
 
步骤二:安装laravel
 
1、composer config repo.packagist composer https://packagist.phpcomposer.com 或
composer config -g repo.packagist composer https://packagist.phpcomposer.com
2、composer global require "laravel/installer" 
3、 laravel new yzm
 
4、安装指定版本(5.3版本)
composer create-project laravel/laravel yzm2 --prefer-dist "5.3.*"
composer create-project laravel/laravel your--project-name --prefer-dist "5.3.*"
5、查看版本:
php artisan -V     //artisan 是 Laravel 项目下的指令文件   切换到项目目录下执行此命令
php artisan --version
 
错误: 
1、执行 composer global require "laravel/installer"  报错 “ Changed current directory to C:/Users/del/AppData/Roaming/Composer”
这是由于composer的镜像下载地址连接不上,只需要修改composer的镜像下载地址为过国内的即可,
执行:composer config repo.packagist composer https://packagist.phpcomposer.com
 
windows-composer-laravel安装

windows-composer-laravel安装


2、执行“laravel new yzm” 报错
说明没有加入laravel 的环境变量
 
windows-composer-laravel安装

windows-composer-laravel安装

windows-composer-laravel安装

windows-composer-laravel安装

上一篇:C# get class and method summary


下一篇:window.location.href的用法