我正在学习以下教程:
http://net.tutsplus.com/tutorials/javascript-ajax/combining-laravel-4-and-backbone/
接下来,我的composer.json文件包含以下内容:
{
"require": {
"laravel/framework": "4.0.*",
"way/generators": "dev-master",
"twitter/bootstrap": "dev-master",
"conarwelsh/mustache-l4": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"mockery/mockery": "0.7.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-update-cmd": "php artisan optimize"
},
"minimum-stability": "dev"
}
我运行composer来安装依赖项
$ composer install --dev
如果我进入供应商文件夹,则没有twitter引导文件夹。(其他依赖项似乎已安装。
当我运行更新时:
$ composer update --dev
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/console (2.3.x-dev 35da735)
- Installing symfony/console (2.3.x-dev 911cdac)
Downloading: 100%
Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes
--没有错误,引导文件不在供应商文件夹中
有人遇到这个问题吗。有什么办法解决它吗?
composer require "twitter/bootstrap":"*"
对我来说很好
上面的解决方案似乎已经不起作用了,我不得不在我的composer.json中添加另一个指向现有引导存储库的包(https://github.com/twbs/bootstrap)
下面是适用于我的部分composer.json。
"repositories": [
{
"type": "package",
"package": {
"version": "3.0.0",
"name": "twbs/bootstrap",
"source": {
"url": "https://github.com/twbs/bootstrap.git",
"type": "git",
"reference": "master"
},
"dist": {
"url": "https://github.com/twbs/bootstrap/zipball/master",
"type": "zip"
}
}
}
],
"require": {
"laravel/framework": "4.0.*",
"twbs/bootstrap": "*"
},
您需要更新composer.phar
运行composer self-update以更新composer.phar,然后在需要运行之后
composer更新以安装twitter引导程序