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

前端 未结 12 2023
情话喂你
情话喂你 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:28

    First add this line to composer.json

    "illuminate/html": "~5.0"
    

    Then do a composer update Wait for the update to finish, then open config/app.php add this:

    'Illuminate\Html\HtmlServiceProvider', 
    

    to the providers array and this:

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

    to the aliases array, and be sure when you use Html in blade or wherever use it in lowercase 'Html' not HTML

    Here is a reference link: http://thegeekyland.blogspot.com/2015/11/class-illuminatehtmlhtmlserviceprovider.html

提交回复
热议问题