Call to undefined method Illuminate\Foundation\Application::bindShared()

According to the previous method, the composer creates a package called illuminate/HTML. It is found that it cannot be used during use, and an error will be thrown when the composer updates

[Symfony\Component\Debug\Exception\FatalErrorException]

Call to undefined method Illuminate\Foundation\Application::bindShared()

reason:

I found out online that it is not supported after 5.1, so I removed illuminate/html from config/app.php

In providers

'Illuminate\Html\HtmlServiceProvider'

In aliases

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

'HTML'      => 'Illuminate\Html\HtmlFacade

Reexecution

composer remove illuminate/html

composer update

After 5.1, it is replaced with the package of laravelcollective/HTML.

composer require laravelcollective/html

In/config/app.php Add the following sentence to the providers array of

Collective\Html\HtmlServiceProvider::class,

In/config/app.php Add the following two sentences to the aliases array of

'Form'=>Collective\Html\FormFacade::class,

'Html'=>Collective\Html\HtmlFacade::class,

Read More: