drdzpknk76046 2015-07-14 15:36
浏览 62
已采纳

无法在Laravel 5.1中安装laravelcollective / html

I have problem when install laravelcollective/html in laravel 5.1 Install laravelcollective/html document. First, I install through Composer:

composer require illuminate/html

message: Using version ~5.0 for illuminate/html ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)

But it's version 5.0 so remove it.

composer remove illuminate/html

And install version 5.1

"require": {
    "laravelcollective/html": "5.1.*"
}

Next, update Composer from the Terminal:

composer update

Next, add your new provider to the providers array of config/app.php:

  'providers' => [
    // ...
    Collective\Html\HtmlServiceProvider::class,
    // ...
  ],

Finally, add two class aliases to the aliases array of config/app.php:

  'aliases' => [
    // ...
      'Form' => Collective\Html\FormFacade::class,
      'Html' => Collective\Html\HtmlFacade::class,
    // ...
  ],

And message error:

 FatalErrorException in ProviderRepository.php line 146:
 Class 'Collective\Html\HtmlServiceProvider' not found
  • 写回答

3条回答 默认 最新

  • doumei3828 2015-08-18 19:12
    关注

    Before I ran composer update, I had somehow added to config/app.php the below and thus it generated the same error you were getting.

    Don't add the below until after doing the composer update.

    'providers' => [
        // ...
        Collective\Html\HtmlServiceProvider::class,
        // ...
      ],
    
      'aliases' => [
        // ...
          'Form' => Collective\Html\FormFacade::class,
          'Html' => Collective\Html\HtmlFacade::class,
        // ...
      ],
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用