【问题标题】:composer require "laravelcollective/html":"^5.4.0" does not working in Laravel 6.2composer require "laravelcollective/html":"^5.4.0" 在 Laravel 6.2 中不起作用
【发布时间】:2019-11-08 06:36:19
【问题描述】:

我尝试在 Laravel 6.2 中安装 composer require "laravelcollective/html":"^5.4.0"。 composer.json 是:

"require": {
    "php": "^7.2",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "^6.2",
    "laravel/tinker": "^1.0"

但是,我得到了如下错误:

 Your requirements could not be resolved to an installable set of packages.

      Problem 1
        - Conclusion: remove laravel/framework v6.5.0
        - Conclusion: don't install laravel/framework v6.5.0
        - laravelcollective/html 5.4.x-dev requires illuminate/view 5.4.* -> satisfiable by illuminate/view[5.4.x-dev, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9]. 

是不是因为命令不支持最新版本的laravel?因为我找到的最新命令是v5.8。如果是,有什么办法可以从 laravel 6.2 版本替换为旧版本?

【问题讨论】:

  • composer.json 可以看出,给定包的 v5.4 仅适用于 Laravel 5.4

标签: php laravel composer-php


【解决方案1】:

使用 6.0 版本,最新版本的 laravel 有很多重大变化,所以还要注意他们的文档。安装最新版本只需运行 composer require laravelcollective/html

read more

【讨论】:

  • 如何在不影响现有项目的情况下更改版本?
  • 您目前使用的是 laravel 6.2,所以它不会损害您当前的项目,我们所做的只是添加新的 laravelcollective 包
【解决方案2】:

如果您需要最新版本,请尝试运行

composer require laravelcollective/html 

【讨论】:

    猜你喜欢
    • 2018-03-10
    • 1970-01-01
    • 1970-01-01
    • 2017-04-09
    • 2023-03-08
    • 2017-03-26
    • 2014-04-13
    • 2016-07-16
    • 1970-01-01
    相关资源
    最近更新 更多