Laravel The pit note--illuminate/html was abandoned

Source: Internet
Author: User
Tags aliases

Cause

An error occurred while using the following code

{!! Form::open ()!!}

Error message

[Symfony\component\debug\exception\fatalerrorexception] Call to undefined method illuminate\foundation\application::bindshared ()

Reason

Find related issues in stack overflow (call to undefined method illuminate\foundation\application::bindshared ())

As you can tell by your answers and official documents (Upgrade Guide),bindshared has been abandoned.


Bindshared method has been deprecated in favor of the singleton Method.--panthro

  

Solve

Open config/app.php

Remove The following sentence

Providers ' Illuminate\html\htmlserviceprovider ' aliases in ' Form '      = ' illuminate\html\formfacade ', ' Html '      = ' Illuminate\html\htmlfacade

Remove illuminate/html Package

Composer Remove Illuminate/htmlcomposer update

From the official documentation we can see that the replacement package is laravelcollective/html

So

Installing laravelcollective/html

Composer require laravelcollective/html

Back to config/app.php

Add The following statement

The ' Form ' =>collective\html\formfacade::class in the collective\html\htmlserviceprovider::class,aliases in providers, ' Html ' =>collective\html\htmlfacade::class,

Problem solving

Other than that

1. Use Laravel version 5.4,php version 5.6 when writing this article

2. Attach Laravel documentation for forms & HTML (based on 5.4)--laravelcollective/html

Laravel The pit note--illuminate/html was abandoned

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.