在5.5。*中安装LaravelCollective

时间:2017-12-01 07:32:37

标签: laravel-5.5

xampp上,在laravelcollective。*版本中安装Laravel 5.5时出现错误消息: -

[UnexpectedValueException]

无法解析版本约束:5.5. :无效的版本字符串“:5.5.

我在终端中使用了composer require "laravelcollective/html":"^5.5.“进行安装 如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

打开您的composer.json文件并手动添加"laravelcollective/html": "5.4.0",

(试试这个5.4.0版本。据我所知,没有类似'5.5.'的laravel集体版本

应该是;

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "intervention/image": "^2.4",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",

        "predis/predis": "^1.1",
        "unisharp/laravel-ckeditor": "^4.6",
        "laravelcollective/html":"^5.4.0" //here
    },

然后说作曲家更新,它应该工作

答案 1 :(得分:0)

打开composer.json并进行以下更改

  "require": {
       "php": ">=7.0.0",
      "doctrine/dbal": "^2.10",
      "fideloper/proxy": "~3.3",
      "laravel/framework": "5.5.*",
       "laravel/tinker": "~1.0",
      "laravelcollective/html": "^5.5" //here
   },

然后将您的作曲家更新为“作曲家更新”。

我的结果

Updating symfony/css-selector (v5.1.5 => v5.1.6): Loading from cache
    Updating nikic/php-parser (v4.10.0 => v4.10.2): Downloading (100%)
    Installing laravelcollective/html (v5.5.4): Downloading (100%)

写作时...成功。