Blogger Information
Blog 5
fans 0
comment 0
visits 4433
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
记录-学习laravel框架时,使用composer安装后无vendor文件夹
月影的博客
Original
875 people have browsed it

问题描述:在使用composer安装laravel时,无vendor文件夹,所以访问项目时会报错

方法一、

更新一下composer的版本并清理一下缓存

composer self-update --preview

composer clearcache

方法二、(这个是解决我的问题的方法)

设置composer中国镜像

修改 composer 的全局配置文件(推荐方式)

打开命令行窗口(windows用户)或控制台(Linux、Mac 用户)并执行如下命令:

composer config -g repo.packagist composer https://packagist.phpcomposer.com  

项目中(cd 进入项目目录,即带有composer.json的目录)再执行composer install

然后执行composer创建项目命令:composer create-project --prefer-dist laravel/laravel blog

composer create-project --prefer-dist laravel/laravel laravel 5.8.*

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments