作曲家laravel创建项目 [英] composer laravel create project
问题描述
我试图使用laravel,当我开始一个项目,并在终端中输入 composer create-project / Applications / MAMP / htdocs / test_laravel
>
I'm trying to use laravel, when I start a project and type composer create-project /Applications/MAMP/htdocs/test_laravel
in terminal it shows
[InvalidArgumentException]
Could not find package /applications/mamp/htdocs/test_laravel with stabilit
y stable.
和
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [package] [directory] [version]
如何解决?
步骤等于创建文件夹和文件像我从laravel下载git laravel-master.zip
?
- < br>
MAMP php5.4.10
--
MAMP php5.4.10
推荐答案
您在命令中缺少一个参数。应按以下顺序:
You are missing a parameter in the command. It should be in this order:
composer create-project [PACKAGE] [DESTINATION PATH] [--FLAGS]
您错误地将您的本地路径指定为要从中创建项目的Composer / Packagist包。因此,无法找到包消息。
You're mistakingly specifying your local path as the Composer/Packagist package you wish to create a project from. Hence the "Could not find package" message.
只需确保您指定的Laravel包,你应该很好去:
Simply make sure you're specifying the Laravel package and you should be good to go:
composer create-project laravel/laravel /Applications/MAMP/htdocs/test_laravel
这篇关于作曲家laravel创建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!