Class 'Illuminate\Html\HtmlServiceProvider' not found Laravel 5

前端 未结 12 1996
情话喂你
情话喂你 2020-11-30 04:31

I\'m trying to add the HtmlServiceProvider with Laravel 5.

I keep getting the following error:

FatalErrorException in compiled.php line 6391:

12条回答
  •  独厮守ぢ
    2020-11-30 05:11

    Illuminate\Html\HtmlServiceProvider is not a core element anymore. Laravel components that have been removed from the core framework are available on laravelcollective.com your html & forms components can be found here:

    http://laravelcollective.com/docs/5.0/html

    add this to your composer.json :

    "laravelcollective/html": "~5.0"
    

    then update composer:

    composer update
    

    then add providers in config/app.php

    'Collective\Html\HtmlServiceProvider',
    

    and finally add two aliases in the same file:

    'Form' => 'Collective\Html\FormFacade',
    'Html' => 'Collective\Html\HtmlFacade',
    

提交回复
热议问题