我尝试安装
composer require gloudemans/shoppingcart
我的laravel项目包。但是我一直收到这个错误
Root composer.json需要gloudemans/shoppingcart^2.6->可满足gloudemans/shoppingcart[2.6.0]。-gloudemands/shoppingkart 2.6.0需要照明/支持5.1.*||5.2.*||5.3.*||5.4.*||5.5.|5.6.|5.7.*->找到了照明/支持[v.1.1,…,5.7.x-dev],但它与另一个需求冲突。
Composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/ui": "^3.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
我是拉拉韦尔的初学者。希望有人能提供解决方案。提前谢谢。
正如错误消息中所写:gloudemans/shoppingcart
与您的应用程序中已经使用的Laravel 8不兼容。hardevine/shoppingcart
或bumbummen99/shoppingcart
似乎是自v5.1 以来与任何Laravel版本兼容的分叉