Learn some of the mistakes Laravel encountered

Source: Internet
Author: User

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


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

The Form and HTML helpers has been deprecated in Laravel 5.0; The form module relies on the Laravel 5.0 framework, so it is still problematic to call in the default 5.2 framework, and now 5.2 has not been repaired, so it needs to be reinstalled.

Solve

1. Add a line "laravelcollective/html" to the require of the Composer.json file: "~5.0″ complete version

    "require": {        "php": ">=5.5.9",        "laravel/framework": "5.2.*", "illuminate/html": "^5.0", "barryvdh/laravel-ide-helper": "v2.1.2", "laravelcollective/html": "~5.0" },

Composer.json location in Laravel directory root layer

2. Then run the command

composer update

Mainly through composer to re-manage the files of the Laravel framework

3. After the update is successful, modify the config/app.php file to add configuration:

#增加providers数组项  ‘providers‘ => [    // ...    Collective\Html\HtmlServiceProvider::class,    // ...  ], #增加alias数组项 ‘aliases‘ => [ // ... ‘Form‘ => Collective\Html\FormFacade::class, ‘Html‘ => Collective\Html\HtmlFacade::class, // ... ],

Learn some of the mistakes Laravel encountered

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.