php 有没有地方可以在一个地方获得laravel`vendor`文件夹?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31932580/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 22:43:51  来源:igfitidea点击:

Is there a place to get the laravel `vendor` folder in one spot?

phpgitlaravelvendors

提问by 1N5818

I realize that this is what composer is used for, but I don't particularly like it. It makes sense, but it annoys me that laravel5's github doesn't work out of the box because it's vendordirectory is somewhat large and isn't necessarily laravel5, although laravel does require it.

我意识到这是作曲家的用途,但我并不特别喜欢它。这是有道理的,但令我烦恼的是,laravel5 的 github 不能开箱即用,因为它的vendor目录有点大而且不一定是 laravel5,尽管 laravel 确实需要它。

It also puzzles me why composer doesn't get it itself.

这也让我感到困惑,为什么 Composer 自己没有得到它。

I would expect to be able to

我希望能够

git clone the_laravel5_github_url

git clone the_laravel5_github_url

composer install

composer install

and be able to run as it seemed like you were able to do at one time, but for some reason now, the vendor directory isn't there. I feel like this makes laravel harder to set up as it isn't so obvious.

并能够运行,因为它似乎是你能够做一次,但是现在某些原因,供应商目录是不存在的。我觉得这让 laravel 更难设置,因为它不是那么明显。

Is there a place where someone can get an recent version of this? I find it disappointing that there is no mention of it on their readme and that you were able to do it before and still can't despite using composer install.

有没有人可以获得最新版本的地方?我发现令人失望的是,他们的自述文件中没有提及它,而且您以前能够做到这一点,但尽管使用composer install.

回答by Gaurang Deshpande

  1. Install Composer on your OS using this command curl -sS https://getcomposer.org/installer | php.
  2. Move the composer.pharfile to /usr/local/bin/ with this command mv composer.phar /usr/local/bin/composer. This will enable you to access composer globally.
  3. git cloneyour project.
  4. Make a vendorsfolder in the root of your project.
  5. cd to root of your project and run composer update. This command will look for vendorsfolder in the root and will install all the packages required by your project in it.
  1. 使用此命令在您的操作系统上安装 Composer curl -sS https://getcomposer.org/installer | php
  2. 使用此命令将composer.phar文件移动到 /usr/local/bin/ mv composer.phar /usr/local/bin/composer。这将使您能够全局访问作曲家。
  3. git clone你的项目。
  4. 在项目的根目录中创建一个vendor文件夹。
  5. cd 到项目的根目录并运行composer update. 此命令将在根目录中查找vendor文件夹,并在其中安装项目所需的所有包。

Happy Coding

快乐编码

Thank you :)

谢谢 :)

回答by Helmer Davila

Use composer install in the same folder of your app. Try composer update. And install composer globally in your OS.

在您的应用程序的同一文件夹中使用 composer install。尝试作曲家更新。并在您的操作系统中全局安装 composer。