小编Dyl*_*lan的帖子

从Illuminate\Html切换到Collective\Html,未找到类'Illuminate\Html\HtmlServiceProvider'

我更新composer.json了删除illuminate\html并添加:

"require": {
    "laravelcollective/html": "5.1.*"
Run Code Online (Sandbox Code Playgroud)

我从app.phpIlluminate\Html中删除了提供者/别名并添加了替换:

    Collective\Html\HtmlServiceProvider::class,
Run Code Online (Sandbox Code Playgroud)

...

    'Form'      => Collective\Html\FormFacade::class,
    'Html'      => Collective\Html\HtmlFacade::class,
Run Code Online (Sandbox Code Playgroud)

但是在运行时composer update我会收到输出:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing illuminate/html (v5.0.0)

- Installing laravelcollective/html (v5.1.4)
  Downloading: 100%  

Writing lock file
Generating autoload files
> php artisan clear-compiled
PHP Fatal error:  Class 'Illuminate\Html\HtmlServiceProvider' not found in vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 648

[Symfony\Component\Debug\Exception\FatalErrorException]  
Class 'Illuminate\Html\HtmlServiceProvider' not found                                                     

Script php artisan clear-compiled handling the post-update-cmd event …
Run Code Online (Sandbox Code Playgroud)

laravel laravel-5 laravel-5.1 laravelcollective

7
推荐指数
1
解决办法
6989
查看次数